Skip to content

Commit

Permalink
ci(test): run tests in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pawcoding committed Jan 26, 2025
1 parent b77de25 commit b1d9aa6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
- name: 🧹 Lint code
run: npm run lint

# Run tests
- name: 🧪 Run tests
run: npm test

# Create release
- name: 🚀 Create release
id: release
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 🧪 Test code
# Run this on every push except master and next
on:
push:
branches:
- '**'
- '!master'
- '!next'
permissions:
contents: read

jobs:
publish:
# Use the latest version of Ubuntu
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
# Checkout repository
- name: 📥 Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false

# Setup Node
- name: 📦 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"

# Install dependencies
- name: 📦 Install dependencies
run: |
npm ci
# Lint code
- name: 🧹 Lint code
run: npm run lint

# Run tests
- name: 🧪 Run tests
run: npm test

0 comments on commit b1d9aa6

Please sign in to comment.