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:
Riccardo
2020-11-28 17:52:02 +01:00
committed by GitHub
parent 6073bf143e
commit 26ab27e06f
10 changed files with 167 additions and 108 deletions

48
.github/workflows/ci.yml vendored Normal file
View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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 }}