Merge pull request #90 from artiphishle/89-chord-piano-progression #68
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Matrix builds allow to test the code against multiple versions of Node.s or on multiple operating systems in parallel. | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategy | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Use Node.js | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Run eslint | |
run: npm run lint | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Run unit tests | |
run: npm test | |
cypress-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Run server and Cypress tests | |
run: | | |
npm run build | |
npm start & | |
sleep 10 | |
npm run test:e2e | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |