GitHub Actions #40
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: CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build2: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: 'yarn' | |
- name: Install dependencies and build | |
run: yarn --frozen-lockfile | |
- name: Zip artifacts | |
run: | | |
cd ${{ github.workspace }} | |
zip -r build-artifacts ${{ github.workspace }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifacts | |
path: build-artifacts.zip | |
lint: | |
needs: build2 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-artifacts | |
- name: Unzip artifacts (Linux, macOS) | |
if: runner.os != 'Windows' | |
run: unzip -l build-artifacts.zip ${{ github.workspace }} | |
- name: Unzip artifacts (Windows) | |
if: runner.os == 'Windows' | |
run: 7z x build-artifacts.zip -o${{ github.workspace }} | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Lint code | |
run: yarn lint | |
- name: Lint API | |
run: yarn lint-api | |
unit-tests: | |
needs: build2 | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] | |
runs-on: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-artifacts | |
- name: Unzip artifacts (Linux, macOS) | |
if: runner.os != 'Windows' | |
run: unzip -l build-artifacts.zip ${{ github.workspace }} | |
- name: Unzip artifacts (Windows) | |
if: runner.os == 'Windows' | |
run: 7z x build-artifacts.zip -o${{ github.workspace }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
- name: Unit tests | |
run: yarn test-unit --forbid-only | |
# build: | |
# strategy: | |
# matrix: | |
# node-version: [16.x, 18.x] | |
# runs-on: [macos-latest, ubuntu-latest, windows-latest] | |
# runs-on: ${{ matrix.runs-on }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# - name: Install dependencies and build | |
# run: yarn --frozen-lockfile | |
# - name: Unit tests | |
# run: yarn test-unit --forbid-only | |
# - name: Lint code | |
# run: yarn lint | |
# - name: Lint API | |
# run: yarn lint-api | |
# integration-tests-chromium: | |
# strategy: | |
# matrix: | |
# node-version: [18.x] | |
# runs-on: [macos-latest, ubuntu-latest, windows-latest] | |
# runs-on: ${{ matrix.runs-on }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# - name: Install dependencies and build | |
# run: yarn --frozen-lockfile | |
# - name: Install playwright | |
# run: npx playwright install | |
# - name: Integration tests (Chromium) | |
# run: yarn test-api-chromium --headless --forbid-only | |
# integration-tests-firefox: | |
# strategy: | |
# matrix: | |
# node-version: [18.x] | |
# runs-on: [macos-latest, ubuntu-latest, windows-latest] | |
# runs-on: ${{ matrix.runs-on }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# - name: Install dependencies and build | |
# run: yarn --frozen-lockfile | |
# - name: Install playwright | |
# run: npx playwright install | |
# - name: Integration tests (Chromium) | |
# run: yarn test-api-firefox --headless --forbid-only |