Skip to content

add npm-test action

add npm-test action #1

Workflow file for this run

name: Unit Tests
on:
schedule:
- cron: 0 */6 * * *
pull_request:
branches: [main]
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 mocha-test

Check failure on line 25 in .github/workflows/npm-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/npm-test.yml

Invalid workflow file

You have an error in your yaml syntax on line 25
- 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 "tests/jest/jest_junit_test.xml" --org-url-slug ${TRUNK_ORG_SLUG} --token ${TRUNK_API_TOKEN}