fix(scaffolding): allow TS Server to see Vitest globals on tests #11
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 workflow | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
paths-ignore: | |
- '.vscode/**' | |
- 'LICENSE' | |
- 'README.md' | |
workflow_dispatch: | |
env: | |
CI: "true" | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
docker: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: ['20.9.0'] | |
name: "Docker: ${{ matrix.os }}" | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
CI: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache pnpm modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ matrix.node }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.node }}-node- | |
- name: Build Docker pnpm image | |
run: docker buildx build -f Dockerfile.pnpm --build-arg NODE_VERSION="${{ matrix.node }}" ./packages -t pnpm | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: ['20.9.0'] | |
name: "Build: ${{ matrix.os }}, Node.js ${{ matrix.node }}" | |
env: | |
CI: 1 | |
steps: | |
- name: Prepare git | |
run: git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
- name: Cache pnpm modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ matrix.node }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.node }}-node- | |
- name: Install dependencies | |
run: pnpm i | |
- name: Transpile TS to JS | |
run: pnpm build | |
- name: Lint code | |
run: pnpm lint:ci | |
- name: Run unit tests | |
run: pnpm test:unit |