aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/ci.yml
blob: f9d3da06e21842a30a85786bc4c2ad656277200c (plain) (blame)
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
41
42
43
name: CI

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  test_local:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: '${{ matrix.os }}'
    name: 'Test / ${{ matrix.os }}'
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          brew install bash coreutils findutils
          echo "$(brew --prefix)/opt/coreutils/libexec/gnubin" >> "$GITHUB_PATH"
          echo "$(brew --prefix)/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH"
        if: runner.os == 'macOS'
        # Is it even macOS anymore? It is for me. I really am too lazy to deal
        # with ancient utilities that come with the actual macOS.

      - name: Test
        run: make test

  test_docker:
    strategy:
      matrix:
        # Keep in sync with those in Makefile:
        distro: [xenial, focal]
    runs-on: ubuntu-latest
    name: 'Test / Docker / ${{ matrix.distro }}'
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Test
        run: make 'test/docker/${{ matrix.distro }}'