mirror of
https://github.com/foambubble/foam.git
synced 2026-01-09 14:08:13 -05:00
Note deletion, events testing, and improved CI
Added API and events around note deletion Improved github workflows, added logic to avoid duplicate runs in CI and merged build + test jobs Added support for running workflows in multiple environments, commented window-2019 as test don't pass, but they will be fixed in another PR to avoid scope creep here.
This commit is contained in:
48
.github/workflows/ci.yml
vendored
Normal file
48
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
# The following will also make the workflow run on all PRs, internal and external.
|
||||
# This would create duplicate runs, that we are skipping by adding the "if" to the jobs below.
|
||||
# See https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'foambubble/foam'
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12'
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
- name: Check Lint Rules
|
||||
run: yarn lint
|
||||
|
||||
test:
|
||||
name: Build and Test
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-10.15, ubuntu-18.04] # add windows-2019 after fixing tests for it
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'foambubble/foam'
|
||||
env:
|
||||
OS: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12'
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
- name: Build Packages
|
||||
run: yarn build
|
||||
- name: Run Tests
|
||||
run: yarn test
|
||||
29
.github/workflows/foam-cli.yml
vendored
29
.github/workflows/foam-cli.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: Test foam-cli
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/foam-cli/**'
|
||||
push:
|
||||
paths:
|
||||
- 'packages/foam-cli/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12'
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Lint foam-lint
|
||||
run: yarn workspace foam-cli lint
|
||||
|
||||
- name: Build foam-core
|
||||
run: yarn workspace foam-core build
|
||||
|
||||
- name: Test foam-cli
|
||||
run: yarn workspace foam-cli test
|
||||
27
.github/workflows/foam-core.yml
vendored
27
.github/workflows/foam-core.yml
vendored
@@ -1,27 +0,0 @@
|
||||
name: Test foam-core
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/foam-core/**'
|
||||
push:
|
||||
paths:
|
||||
- 'packages/foam-core/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Lint foam-core
|
||||
run: yarn workspace foam-core lint
|
||||
|
||||
- name: Test foam-core
|
||||
run: yarn workspace foam-core test
|
||||
35
.github/workflows/foam-vscode.yml
vendored
35
.github/workflows/foam-vscode.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: Test foam-vscode
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/foam-vscode/**'
|
||||
push:
|
||||
paths:
|
||||
- 'packages/foam-vscode/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Lint foam-vscode
|
||||
run: yarn workspace foam-vscode lint
|
||||
|
||||
- name: Build foam-core
|
||||
run: yarn workspace foam-core build
|
||||
|
||||
- name: Test foam-vscode
|
||||
run: yarn workspace foam-vscode test
|
||||
# - name: Publish foam-vscode
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# run: yarn workspace foam-vscode publish-extension
|
||||
# with:
|
||||
# vsce_token: ${{ secrets.VSCE_TOKEN }}
|
||||
Reference in New Issue
Block a user