Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/deploy-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,30 @@ concurrency:
cancel-in-progress: true

jobs:
# The release gate (unit test plan, 26 November): a failing unit test or
# lint error stops the deploy. Node 22, since `npm test` passes a glob to
# `node --test`, which Node 20 does not expand.
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: topologicpy-web-frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: topologicpy-web-frontend/package-lock.json
- name: Install
run: npm ci
- name: Unit tests
run: npm test
- name: Lint
run: npm run lint

build:
needs: test
runs-on: ubuntu-latest
defaults:
run:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Tests

# The pull-request level of the release gate (unit test plan, 26 November):
# unit tests, lint and a build on every pull request into main. A red run
# should block the merge.
on:
pull_request:
branches: [main]
paths:
- 'topologicpy-web-frontend/**'
- '.github/workflows/**'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: topologicpy-web-frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: topologicpy-web-frontend/package-lock.json
- name: Install
run: npm ci
- name: Unit tests
run: npm test
- name: Lint
run: npm run lint
- name: Build
run: npm run build
Loading