Skip to content

Merge pull request #44 from SpiriitLabs/dev #150

Merge pull request #44 from SpiriitLabs/dev

Merge pull request #44 from SpiriitLabs/dev #150

Workflow file for this run

name: CI
env:
# 7 GiB by default on GitHub, setting to 6 GiB
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: 'Build: node-20, ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Set node version to 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install
run: pnpm install
- name: Build
run: pnpm build
test:
name: 'Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [14, 16, 18, 20]
include:
# Active LTS + other OS
- os: macos-latest
node_version: 20
- os: windows-latest
node_version: 20
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install pnpm (node 14, pnpm 7)
if: matrix.node_version == 14
uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: Install pnpm
if: matrix.node_version != 14
uses: pnpm/action-setup@v2.2.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install Python
if: matrix.os == 'macos-latest'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install setuptools
- name: Install
run: pnpm install
- name: Build
run: pnpm build
- name: Install Playwright
run: npx playwright install
- name: Test
run: pnpm test
- name: Upload artifacts on failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-project-${{ matrix.os }}-${{ matrix.node-version }}
path: test/project/
coverage:
runs-on: ubuntu-latest
name: 'Coverage: node-20, ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Set node version to 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install
run: pnpm install
- name: Install Playwright
run: npx playwright install
- name: Test
run: pnpm coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lint:
runs-on: ubuntu-latest
name: 'Lint: node-20, ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Set node version to 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install
run: pnpm install
- name: Lint
run: pnpm lint
- name: Typecheck
run: pnpm typecheck