insomnia/.github/workflows/test.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

2020-04-26 20:33:39 +00:00
name: Test
2020-05-28 22:45:37 +00:00
on:
push:
branches:
- develop
- master
pull_request:
types:
- opened
- synchronize
2020-04-26 20:33:39 +00:00
jobs:
OS:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
2020-04-26 20:33:39 +00:00
steps:
- name: Checkout branch
uses: actions/checkout@v1
- name: Read Node version from .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- uses: actions/setup-node@v1
2020-04-26 20:33:39 +00:00
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
2020-04-26 20:33:39 +00:00
- name: Bootstrap packages
run: npm run bootstrap
- name: Lint
run: npm run lint
2020-04-26 20:33:39 +00:00
- name: Run tests
run: npm test
- name: Build for smoke tests
run: npm run app-build:smoke
- name: Run smoke tests
timeout-minutes: 10 # sometimes jest fails to exit - https://github.com/facebook/jest/issues/6423#issuecomment-620407580
run: npm run test:smoke:build
- name: Upload smoke test screenshots
uses: actions/upload-artifact@v2
if: always()
with:
if-no-files-found: ignore
name: ${{ matrix.os }}-smoke-test-screenshots-${{ github.run_number }}
path: packages/insomnia-smoke-test/screenshots
- name: Run CLI smoke tests
run: npm run test:smoke:cli