tracker: add restart on token expiration for canvas tracker #1
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
# Checking unit tests for tracker and assist | |
name: Tracker tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main", "dev" ] | |
paths: | |
- tracker/** | |
pull_request: | |
branches: [ "dev", "main" ] | |
paths: | |
- frontend/** | |
- tracker/** | |
jobs: | |
build-and-test: | |
runs-on: macos-latest | |
name: Build and test Tracker | |
strategy: | |
matrix: | |
node-version: [ 18.x ] | |
steps: | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache tracker modules | |
uses: actions/cache@v3 | |
with: | |
path: tracker/tracker/node_modules | |
key: ${{ runner.OS }}-test_tracker_build-${{ hashFiles('**/bun.lockb') }} | |
restore-keys: | | |
test_tracker_build{{ runner.OS }}-build- | |
test_tracker_build{{ runner.OS }}- | |
- name: Cache tracker-assist modules | |
uses: actions/cache@v3 | |
with: | |
path: tracker/tracker-assist/node_modules | |
key: ${{ runner.OS }}-test_tracker_build-${{ hashFiles('**/bun.lockb') }} | |
restore-keys: | | |
test_tracker_build{{ runner.OS }}-build- | |
test_tracker_build{{ runner.OS }}- | |
- name: Setup Testing packages | |
run: | | |
cd tracker/tracker | |
bun install | |
- name: Jest tests | |
run: | | |
cd tracker/tracker | |
bun run test:ci | |
- name: Building test | |
run: | | |
cd tracker/tracker | |
bun run build | |
- name: (TA) Setup Testing packages | |
run: | | |
cd tracker/tracker-assist | |
bun install | |
- name: (TA) Jest tests | |
run: | | |
cd tracker/tracker-assist | |
bun run test:ci | |
- name: (TA) Building test | |
run: | | |
cd tracker/tracker-assist | |
bun run build | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: tracker | |
iame: tracker |