fix: tests #57
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: CD | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- '!*' # Do not execute on tags | |
paths: | |
- src/** | |
- tools/** | |
- yarn.lock | |
- .github/workflows/cd-scripts.yml | |
- eslint.config.js | |
- vitest.config.ts | |
- tsconfig.json | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
submodules: true | |
- run: corepack enable | |
- uses: actions/[email protected] | |
with: | |
node-version: 22 | |
- run: yarn install --immutable | |
- run: node tools/build | |
- run: yarn test --run --coverage | |
- name: Upload coverage | |
# Run only on push on main repo | |
if: github.repository == 'LushWay/Scripts' && github.ref == 'refs/heads/main' | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
submodules: true | |
- run: corepack enable | |
- uses: actions/[email protected] | |
with: | |
node-version: 22 | |
- run: yarn install --immutable | |
- run: node tools/build | |
- run: yarn tsc -b | |
- run: yarn eslint src |