summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
blob: 789409aebca68af5f35ed95a2588127f95b705e4 (plain)
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
31
32
33
34
35
36
37
38
39
40
name: CI

on:
  push:
    branches: [main]
  pull_request:
  workflow_dispatch:

jobs:
  test-module:
    name: Test module
    runs-on: ubuntu-latest

    permissions:
      contents: read

    steps:
      - name: Checkout repository
        uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

      - name: Install Nix
        uses: DeterminateSystems/nix-installer-action@de22e16c4711fca50c816cc9081563429d1cf563 # v10

      - name: Run test script
        run: |
          function catch_error() {
            echo "Job $1 failed!"
            exit 1
          }

          tests=(
            "overmind"
            "overmind-dft"
            "honcho"
          )

          for test in "${tests[@]}"; do
            nix develop ./test#"$test" --command 'run-ci' || catch_error "$test"
            sleep 5 # this is to avoid race conditions with the current proc runner not exiting just yet
          done