Skip to content

fix(ci): Security Scan called a repo name that no longer exists #181

fix(ci): Security Scan called a repo name that no longer exists

fix(ci): Security Scan called a repo name that no longer exists #181

Workflow file for this run

# SPDX-License-Identifier: MPL-2.0
# Elixir CI for the orchestration layer: compile, format check, test, audit.
name: elixir-ci
on:
push:
branches: [main, master]
paths:
- "elixir-orchestration/**"
- ".github/workflows/elixir-ci.yml"
# No pull_request paths-filter: 'benchee scripts compile' and 'hex audit' are
# REQUIRED status checks, so they must report on every PR (a path-filtered required
# check deadlocks PRs that don't touch its paths). The "Detect relevant changes"
# step in each job gates the heavy work; non-required jobs are gated the same way so
# they don't run on every unrelated PR.
pull_request:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
pull-requests: read # change-detector reads the PR's file list
env:
MIX_ENV: test
concurrency:
group: elixir-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
name: compile + test
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: elixir-orchestration
strategy:
matrix:
include:
- elixir: "1.17"
otp: "27"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Detect relevant changes
id: detect
working-directory: ${{ github.workspace }}
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
PATTERN='^elixir-orchestration/'
if [ "${{ github.event_name }}" = "pull_request" ]; then
FILES=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --paginate --jq '.[].filename')
if printf '%s\n' "$FILES" | grep -qE "$PATTERN"; then
echo "relevant=true" >> "$GITHUB_OUTPUT"
else
echo "relevant=false" >> "$GITHUB_OUTPUT"; echo "No elixir-orchestration changes — pass-through (required-check shim)."
fi
else
echo "relevant=true" >> "$GITHUB_OUTPUT"
fi
- if: steps.detect.outputs.relevant == 'true'
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- if: steps.detect.outputs.relevant == 'true'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
elixir-orchestration/deps
elixir-orchestration/_build
key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('elixir-orchestration/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-
- if: steps.detect.outputs.relevant == 'true'
run: mix deps.get
- if: steps.detect.outputs.relevant == 'true'
run: mix format --check-formatted
- if: steps.detect.outputs.relevant == 'true'
run: mix compile --warnings-as-errors
- if: steps.detect.outputs.relevant == 'true'
run: mix test
coverage:
# Unit-test coverage only: the federation adapters are exercised by the
# :integration suite (live databases; excluded in CI) and are skipped in
# coveralls.json, so they don't dilute the unit-coverage denominator.
name: ExCoveralls (unit, gate in coveralls.json)
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: elixir-orchestration
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Detect relevant changes
id: detect
working-directory: ${{ github.workspace }}
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
PATTERN='^elixir-orchestration/'
if [ "${{ github.event_name }}" = "pull_request" ]; then
FILES=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --paginate --jq '.[].filename')
if printf '%s\n' "$FILES" | grep -qE "$PATTERN"; then
echo "relevant=true" >> "$GITHUB_OUTPUT"
else
echo "relevant=false" >> "$GITHUB_OUTPUT"; echo "No elixir-orchestration changes — pass-through (required-check shim)."
fi
else
echo "relevant=true" >> "$GITHUB_OUTPUT"
fi
- if: steps.detect.outputs.relevant == 'true'
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
with:
elixir-version: "1.17"
otp-version: "27"
- if: steps.detect.outputs.relevant == 'true'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
elixir-orchestration/deps
elixir-orchestration/_build
key: ${{ runner.os }}-mix-coverage-${{ hashFiles('elixir-orchestration/mix.lock') }}
- if: steps.detect.outputs.relevant == 'true'
run: mix deps.get
- if: steps.detect.outputs.relevant == 'true'
run: mix coveralls.json
- if: steps.detect.outputs.relevant == 'true'
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: elixir-orchestration/cover/excoveralls.json
flags: elixir
fail_ci_if_error: false
continue-on-error: true
bench-compile:
name: benchee scripts compile
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: elixir-orchestration
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Detect relevant changes
id: detect
working-directory: ${{ github.workspace }}
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
PATTERN='^elixir-orchestration/'
if [ "${{ github.event_name }}" = "pull_request" ]; then
FILES=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --paginate --jq '.[].filename')
if printf '%s\n' "$FILES" | grep -qE "$PATTERN"; then
echo "relevant=true" >> "$GITHUB_OUTPUT"
else
echo "relevant=false" >> "$GITHUB_OUTPUT"; echo "No elixir-orchestration changes — pass-through (required-check shim)."
fi
else
echo "relevant=true" >> "$GITHUB_OUTPUT"
fi
- if: steps.detect.outputs.relevant == 'true'
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
with:
elixir-version: "1.17"
otp-version: "27"
- if: steps.detect.outputs.relevant == 'true'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
elixir-orchestration/deps
elixir-orchestration/_build
key: ${{ runner.os }}-mix-bench-${{ hashFiles('elixir-orchestration/mix.lock') }}
- if: steps.detect.outputs.relevant == 'true'
run: mix deps.get
- name: Syntax check all bench scripts
if: steps.detect.outputs.relevant == 'true'
run: |
for f in bench/*.exs; do
elixir -e "Code.string_to_quoted!(File.read!(\"$f\"))"
echo " ✓ $f parses"
done
audit:
name: hex audit
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: elixir-orchestration
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Detect relevant changes
id: detect
working-directory: ${{ github.workspace }}
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
PATTERN='^elixir-orchestration/'
if [ "${{ github.event_name }}" = "pull_request" ]; then
FILES=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --paginate --jq '.[].filename')
if printf '%s\n' "$FILES" | grep -qE "$PATTERN"; then
echo "relevant=true" >> "$GITHUB_OUTPUT"
else
echo "relevant=false" >> "$GITHUB_OUTPUT"; echo "No elixir-orchestration changes — pass-through (required-check shim)."
fi
else
echo "relevant=true" >> "$GITHUB_OUTPUT"
fi
- if: steps.detect.outputs.relevant == 'true'
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
with:
elixir-version: "1.17"
otp-version: "27"
- if: steps.detect.outputs.relevant == 'true'
run: mix deps.get
- if: steps.detect.outputs.relevant == 'true'
run: mix hex.audit
- if: steps.detect.outputs.relevant == 'true'
run: mix deps.unlock --check-unused