mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-12-31 04:22:28 +00:00
* wip * feat: add paerser as submodule and apply patch for nested maps * refactor: update release workflows to include submodule and patches * chore: update contributing instructions
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
name: Tinyauth CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Setup go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "^1.24.0"
|
|
|
|
- name: Initialize submodules
|
|
run: |
|
|
git submodule init
|
|
git submodule update
|
|
|
|
- name: Apply patches
|
|
run: |
|
|
git apply --directory paerser/ patches/nested_maps.diff
|
|
|
|
- name: Install frontend dependencies
|
|
run: |
|
|
cd frontend
|
|
bun install --frozen-lockfile
|
|
|
|
- name: Set version
|
|
run: |
|
|
echo testing > internal/assets/version
|
|
|
|
- name: Lint frontend
|
|
run: |
|
|
cd frontend
|
|
bun run lint
|
|
|
|
- name: Build frontend
|
|
run: |
|
|
cd frontend
|
|
bun run build
|
|
|
|
- name: Copy frontend
|
|
run: |
|
|
cp -r frontend/dist internal/assets/dist
|
|
|
|
- name: Run tests
|
|
run: go test -coverprofile=coverage.txt -v ./...
|
|
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|