Skip to content

Commit

Permalink
Basic Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lirsacc committed Nov 28, 2023
1 parent b47c5aa commit 0b73dda
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
id: setup-bun
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ steps.setup-bun.bun-version }}-node-modules
- name: Install deps
run: bun install
- name: Check formatting
run: bun run fmt-check
- name: ESLint
run: bun run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
id: setup-bun
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ steps.setup-bun.bun-version }}-node-modules
- name: Install deps
run: bun install
- name: Typecheck
run: bun run typecheck
build:
runs-on: ubuntu-latest
needs:
- lint
- typecheck
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
id: setup-bun
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ steps.setup-bun.bun-version }}-node-modules
- name: Install deps
run: bun install
- name: Build
run: bun run build
- name: Archive dist
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
docker:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: docker build
uses: docker/build-push-action@v5
with:
push: false # Only checking build works for now
tags: lirsacc/siren-chorus:latest
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 0b73dda

Please sign in to comment.