chore(release): v0.22.2 🎉 #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-on-commit | |
on: | |
push: | |
branches: # run for any branch | |
- '**' | |
tags-ignore: # but not for releases, as deploy_on_tag will trigger for it | |
- '**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
install: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: install | |
run: npm ci | |
- name: cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
# run tests in parallel | |
test-commits: | |
runs-on: ubuntu-20.04 | |
needs: [install] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # we need all commits to test:commits | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: grab node_modules from cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
- name: test:commits | |
run: npm run test:commits | |
test-types: | |
runs-on: ubuntu-20.04 | |
needs: [install] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: grab node_modules from cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
- name: test:types | |
run: npm run test:types | |
test-format: | |
runs-on: ubuntu-20.04 | |
needs: [install] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: grab node_modules from cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
- name: test:format | |
run: npm run test:format | |
test-lint: | |
runs-on: ubuntu-20.04 | |
needs: [install] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: grab node_modules from cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
- name: test:lint | |
run: npm run test:lint | |
test-unit: | |
runs-on: ubuntu-20.04 | |
needs: [install] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: grab node_modules from cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
- name: test:unit | |
run: npm run test:unit | |
test-integration: | |
runs-on: ubuntu-20.04 | |
needs: [install] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: grab node_modules from cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
- name: provision:integration-test-db | |
run: npm run provision:integration-test-db | |
- name: test:integration | |
run: npm run test:integration | |
test-acceptance-locally: | |
runs-on: ubuntu-20.04 | |
needs: [install] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: read nvmrc | |
id: nvmrc | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: grab node_modules from cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ github.sha }} | |
- name: provision:integration-test-db | |
run: npm run provision:integration-test-db | |
- name: test:acceptance:locally | |
run: npm run test:acceptance:locally |