Use reusable Bump Version workflow #33
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: TypeScript CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
'on': | |
push: | |
branches: | |
- main | |
pull_request: null | |
workflow_dispatch: null | |
jobs: | |
test: | |
runs-on: ${{ matrix.system.os }} | |
strategy: | |
matrix: | |
rust_version: | |
- stable | |
- beta | |
node_version: | |
- 16 | |
- 18 | |
- 20 | |
system: | |
- os: macos-12 | |
target: x86_64-apple-darwin | |
arch: x64 | |
- os: buildjet-2vcpu-ubuntu-2204 | |
target: x86_64-unknown-linux-gnu | |
arch: x64 | |
- os: buildjet-4vcpu-ubuntu-2204-arm | |
target: arm64-unknown-linux-gnu | |
arch: arm64 | |
- os: windows-2019 | |
target: x86_64-pc-windows-msvc | |
arch: x64 | |
- os: [self-hosted, macOS, ARM64] | |
target: aarch64-apple-darwin | |
arch: arm64 | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
cache: yarn | |
architecture: ${{ matrix.system.arch }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust_version }} | |
override: true | |
- name: Install modules | |
run: yarn install --ignore-scripts | |
- name: Compile | |
run: yarn run compile | |
- name: Run tests | |
run: yarn run test | |
- name: Check test coverage | |
if: ${{ contains(matrix.system.os, 'ubuntu') && matrix.node_version == '16' | |
&& matrix.rust_version == 'stable' && github.base_ref != '' }} | |
uses: anuraag016/[email protected] | |
with: | |
fullCoverageDiff: false | |
delta: 0.2 | |
afterSwitchCommand: yarn install --ignore-scripts && yarn run compile | |
accessToken: ${{ secrets.WORKFLOW_PAT }} | |
test-docker: | |
runs-on: ${{ matrix.os }} | |
container: | |
image: node:${{ matrix.node_version }}-alpine | |
strategy: | |
matrix: | |
rust_version: | |
- stable | |
- beta | |
node_version: | |
- 16 | |
- 18 | |
- 20 | |
os: | |
- buildjet-2vcpu-ubuntu-2204 | |
- buildjet-4vcpu-ubuntu-2204-arm | |
fail-fast: false | |
steps: | |
- run: apk add build-base git python3 wget | |
# https://github.com/actions/runner/issues/801#issuecomment-1374967227 | |
- run: | | |
apk add gcompat | |
sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release | |
- run: echo RUSTFLAGS="-C target-feature=-crt-static" >> "${GITHUB_ENV}" | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust_version }} | |
override: true | |
- name: Install modules | |
run: yarn install --ignore-scripts | |
- name: Compile | |
run: yarn run compile | |
- name: Run tests | |
run: yarn run test |