Skip to content

Commit

Permalink
[CI] Run npm test
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jan 13, 2024
1 parent 91e0815 commit b2c7f3c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: smoke

on:
push:
branches: [ main ]
branches: [main]
pull_request:
schedule: # midnight every day
- cron: '0 0 * * *'
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: test

on:
push:
branches: [main]
pull_request:
schedule:
- cron: '11 0 * * *' # 11 past midnight every day
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
env:
BASE_REPO: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
SHA: ${{ github.sha }}
# TODO: drop PR testing under Windows because it's too slow?
# if: github.event_name != 'pull_request' && matrix.os != 'windows-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package.json
- run: npm install --omit=optional
shell: bash
- run: npm test

0 comments on commit b2c7f3c

Please sign in to comment.