Skip to content

fix: trailing slash redirects #15

fix: trailing slash redirects

fix: trailing slash redirects #15

Workflow file for this run

name: Release
on:
push:
branches: [main, dev]
paths-ignore:
- "docs/**"
pull_request:
branches: [main, dev]
paths-ignore:
- "docs/**"
env:
SQLX_OFFLINE: true
jobs:
build:
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Rust build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: rust-build-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
rust-build-${{ runner.os }}-
- name: Build all targets
run: cargo build --all-targets
unit-tests:
needs: [build]
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore Rust build cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: rust-build-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
rust-build-${{ runner.os }}-
- name: Run unit tests
run: cargo test --lib
frontend:
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Build frontend
working-directory: web
run: npm ci && npm run build
lint:
needs: [build]
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore Rust build cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: rust-build-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
rust-build-${{ runner.os }}-
- name: Check formatting
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
e2e-tests-sqlite:
needs: [build]
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore Rust build cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: rust-build-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
rust-build-${{ runner.os }}-
- name: Run e2e tests (SQLite)
run: cargo test --tests -- _sqlite
e2e-tests-postgres:
needs: [build]
runs-on: depot-ubuntu-24.04
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_USER: debuff
POSTGRES_PASSWORD: debuff
POSTGRES_DB: debuff_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
TEST_DATABASE_URL: postgres://debuff:debuff@localhost:5432/debuff_test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore Rust build cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: rust-build-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
rust-build-${{ runner.os }}-
- name: Run e2e tests (Postgres)
run: cargo test --tests -- _postgres --ignored
release:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')
needs: [unit-tests, frontend, lint, e2e-tests-sqlite, e2e-tests-postgres]
runs-on: depot-ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }}
run: npx semantic-release