Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Set up test workflow #8

Merged
merged 7 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Run tests"

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: "Run tests (OS: ${{matrix.os}}, Node: ${{ matrix.node }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# TODO(#496): Figure out why Node 18 is segfaulting
node: [20]
os: [ubuntu-latest, macos-latest]
steps:
# Environment security
- name: Step Security
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit

# Checkout
# Most toolchains require checkout first
- name: Checkout
uses: actions/checkout@v4

# Language toolchains
- name: Install Node
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
cache: npm

# Workflow

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test
1 change: 1 addition & 0 deletions analyze/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"prepublishOnly": "npm run build",
"build": "rollup --config rollup.config.js",
"lint": "eslint .",
"pretest": "npm run build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests"
},
"sideEffects": [
Expand Down
1 change: 1 addition & 0 deletions arcjet-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"prepublishOnly": "npm run build",
"build": "rollup --config rollup.config.js",
"lint": "eslint .",
"pretest": "npm run build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions arcjet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"prepublishOnly": "npm run build",
"build": "rollup --config rollup.config.js",
"lint": "eslint .",
"pretest": "npm run build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
},
"dependencies": {
Expand Down
Loading