Skip to content

Commit

Permalink
ci: add test and draft release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
acodeninja committed Jul 22, 2024
1 parent 0fb95c1 commit 600df59
Show file tree
Hide file tree
Showing 7 changed files with 892 additions and 839 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 📋 draft release

run-name: 📋 @${{ github.triggering_actor }} is drafting a release

on:
push:
branches: [ main ]

jobs:
draft-release:
name: 📋 draft release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: asdf-vm/actions/install@v3
- run: npm clean-install
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🔬 quality checks

run-name: 🔬 @${{ github.triggering_actor }} is checking quality on ${{ github.ref_name }}

on:
pull_request:
push:

jobs:
lint:
name: 🧹 lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: make init
- run: make lint

test-with-coverage:
name: 🧪 test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: make init
- run: make test/coverage
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 22.4.1
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ commit/pre: lint test
commit/message:
commitlint --edit $(MESSAGE)

init: node_modules ## Initialise dependencies

lint: ## Codebase style checks
npm run lint

Expand All @@ -25,3 +27,6 @@ test/watch:

test/coverage:
npm run test:coverage

node_modules:
@npm install
Loading

0 comments on commit 600df59

Please sign in to comment.