Skip to content

Commit

Permalink
chore: Add basic CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
angelmadames committed Feb 14, 2024
1 parent dabbd25 commit a40fdfb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 🧪 Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.ref }}'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 💻 Checkout current code ref
uses: actions/checkout@v4

- name: 🟢 Configure Bun on runner
uses: oven-sh/setup-bun@v1

- name: 📦 Install package dependencies using lockfile
run: bun install --frozen-lockfile

- name: 🔨 Run build
run: |
bun run build
bun run compile
- name: 🌷 Run format, lint & check with Biome
run: |
bun run format:ci
bun run lint:ci
bun run check:ci
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
"build": "bun build --target=bun ./cli.ts --outdir dist/",
"compile": "bun build --compile ./cli.ts --outfile ./dems",
"format": "biome format src/ test/ --write",
"lint": "biome lint src/ test/",
"format:ci": "biome format src/ test/",
"lint": "biome lint src/ test/ --apply",
"lint:ci": "biome lint src/ test/",
"check": "biome check src/ test/ --apply",
"check:ci": "biome check src/ test/",
"test": "bun test"
},
"devDependencies": {
Expand Down

0 comments on commit a40fdfb

Please sign in to comment.