Skip to content

Commit

Permalink
ci: add ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
inigomarquinez committed Jan 30, 2024
1 parent d67c0fa commit 7d99a8e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2,357 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
steps:
- name: 🔐 Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
registry.npmjs.org:443
api.github.com:443
nodejs.org:443
- name: ⚙️ Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: ⚙️ Install Node versions
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ matrix.node-version }}

- name: ⚙️ Install dependencies
run: npm ci

- name: 👀 Lint files
run: npm run lint

- name: 🧪 Run tests
run: npm run test:ci
Loading

0 comments on commit 7d99a8e

Please sign in to comment.