Files
phoenix/.gitea/workflows/ci.yml
Tobias Klemp cce1dfff33
Some checks failed
CI / install (pull_request) Successful in 3m28s
CI / lint (pull_request) Failing after 45s
CI / type-check (pull_request) Failing after 43s
CI / build (pull_request) Failing after 10m2s
CI / format-check (pull_request) Failing after 10m7s
fix: lint and format cmds
2025-12-03 22:40:08 +01:00

130 lines
3.0 KiB
YAML

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
install:
runs-on: ubuntu-latest
container:
image: oven/bun:alpine
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate cache key
id: cache-key
run: echo "key=bun-${{ hashFiles('**/bun.lock') }}" >> $GITHUB_OUTPUT
- name: Restore node_modules cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: node_modules
key: ${{ steps.cache-key.outputs.key }}
restore-keys: |
bun-
- name: Install dependencies
if: steps.cache-restore.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Save node_modules cache
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: node_modules
key: ${{ steps.cache-key.outputs.key }}
type-check:
runs-on: ubuntu-latest
container:
image: oven/bun:alpine
needs: install
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restore node_modules
uses: actions/cache/restore@v4
with:
path: node_modules
key: ${{ needs.install.outputs.cache-key }}
restore-keys: |
bun-
- name: Run type checking
run: bun run check
lint:
runs-on: ubuntu-latest
container:
image: oven/bun:alpine
needs: install
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restore node_modules
uses: actions/cache/restore@v4
with:
path: node_modules
key: ${{ needs.install.outputs.cache-key }}
restore-keys: |
bun-
- name: Run linting
run: bun run lint:check
format-check:
runs-on: ubuntu-latest
container:
image: oven/bun:alpine
needs: install
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restore node_modules
uses: actions/cache/restore@v4
with:
path: node_modules
key: ${{ needs.install.outputs.cache-key }}
restore-keys: |
bun-
- name: Check formatting
run: bun run format:check
build:
runs-on: ubuntu-latest
container:
image: oven/bun:alpine
needs: install
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restore node_modules
uses: actions/cache/restore@v4
with:
path: node_modules
key: ${{ needs.install.outputs.cache-key }}
restore-keys: |
bun-
- name: Build application
run: bun run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: build/
retention-days: 7