1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Docker Test

on:
  # Allow manual workflow triggering from the "Actions" tab.
  workflow_dispatch:

jobs:
  test:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false

    - name: Create configuration file
      run: cp docker/byceps/config.toml.example docker/byceps/config.toml

    - name: Create services
      run: docker compose up --no-start --quiet-pull

    - name: Generate secret key
      run: docker compose run --rm byceps-apps uv run byceps generate-secret-key > ./secret_key.txt

    - name: Insert secret key into configuration file
      run: sed -i '/secret_key = ""/s|^.*|secret_key = "fake-secret-key-for-testing"|' docker/byceps/config.toml

    - name: Initialize database
      run: docker compose run --rm byceps-apps uv run byceps initialize-database