Unit Tests #287
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: 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}} |