Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust workflow #57

Merged
merged 3 commits into from
Aug 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 68 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,48 @@ on:
branches: [ master ]

jobs:
test:
name: Run tests and linter
lint:
name: Run linter
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

test-node-16:
name: Test Node.js v16
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.3.0
with:
mongodb-version: '4.0'

- name: Install dependencies
run: npm ci

- name: Run test
run: npm run test:report

- name: Report coverage
run: npm run test:send

test-node-14:
name: Test Node.js v14
runs-on: ubuntu-latest

steps:
Expand All @@ -23,16 +63,34 @@ jobs:
mongodb-version: '4.0'

- name: Install dependencies
run: yarn install
run: npm ci

- name: Install Sapling
- name: Install peer dependencies
run: npx npm-install-peers

- name: Run linter
run: npm run lint

- name: Run test
run: npm run test:report
run: npm run test

- name: Report coverage
run: npm run test:send
test-node-12:
name: Test Node.js v12
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.3.0
with:
mongodb-version: '4.0'

- name: Install dependencies
run: npm ci

- name: Install peer dependencies
run: npx npm-install-peers

- name: Run test
run: npm run test