Skip to content

Unit Tests

Unit Tests #178

Workflow file for this run

name: Unit Tests
on:
schedule:
- cron: 0 */6 * * *
pull_request:
branches: [main]
push:
branches: ["*"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: install deps
run: npm ci
- name: run tests
run: npm run vitest
- name: hello
run: echo 'hello'
- name: upload tests
run: |
curl -fsSL --retry 3 "https://github.com/trunk-io/analytics-cli/releases/latest/download/trunk-analytics-cli-x86_64-unknown-linux.tar.gz" | tar -xvz > ./trunk-analytics-cli
./trunk-analytics-cli upload --junit-paths "test-output.xml" --org-url-slug ${{secrets.TRUNK_ORG_SLUG}} --token ${{secrets.TRUNK_API_TOKEN}}