typed-fields 0.6.1

A collection of macros that generate newtypes
Documentation
---
name: Continuous Integration

"on":
  pull_request:
  workflow_dispatch:

permissions: {}

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  targets:
    name: Enumerate Just recipes
    runs-on: ubuntu-latest

    permissions:
      contents: read

    outputs:
      matrix: ${{ steps.export-targets.outputs.targets }}

    steps:
      - name: Checkout code
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
        with:
          persist-credentials: false

      - name: Install Just
        uses: taiki-e/install-action@650c5ca14212efbbf3e580844b04bdccf68dac31 # 2.67.18
        with:
          tool: just

      - name: Export targets
        id: export-targets
        run: echo "targets=$(just --list | awk '/build-|check-|format-|lint-|test-/{print $1}' | jq -cnR '[inputs]')" >> "$GITHUB_OUTPUT"

  checks:
    name: ${{ matrix.target }}
    runs-on: ubuntu-latest

    permissions:
      contents: read

    needs: targets

    strategy:
      fail-fast: false
      matrix:
        target: ${{ fromJson(needs.targets.outputs.matrix) }}

    steps:
      - name: Checkout code
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
        with:
          persist-credentials: false

      - name: Install Flox
        uses: flox/install-flox-action@9428713e8d3883274c334b4b95b8830beebd24d2 # 2.3.0

      - name: Remove Flox installer (if it exists)
        run: rm -f flox.x86_64-linux.deb

      - name: Run check with Just
        uses: flox/activate-action@410568008895a0f2e09a34bbd9523f8ef1f2d292 # 1.1.0
        with:
          command: just ${{ matrix.target }}

  success:
    name: All checks succeeded
    runs-on: ubuntu-latest

    permissions: {}

    needs: checks
    if: always()

    steps:
      - name: Check if all checks succeeded
        # `needs` is a list of job names, which themselves are generated from
        # the output of `just --list`, so we ignore the template injection here.
        # zizmor: ignore[template-injection]
        run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'