Skip to content

ci: fail if output files have not been updated prior to PR #512

ci: fail if output files have not been updated prior to PR

ci: fail if output files have not been updated prior to PR #512

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "0 5 * * 0"
# Cancel any in-progress runs when a new run is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: CI
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: latest
environment-file: environment.yaml
log-level: debug
init-shell: bash
cache-environment: true
cache-downloads: true
- name: Run unit tests
run: |
make unit-test
- name: Test snakemake workflows
run: |
make test
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: technology-data
path: outputs/
- name: Check for differences in generated outputs
run: |-
git config --global --add safe.directory $GITHUB_WORKSPACE
git add outputs/
DIFF_FILES=$(git diff --cached --name-only)
if [ -n "$DIFF_FILES" ]; then
echo "The following files are different:"
echo "$DIFF_FILES"
exit 1
else
echo "No differences found in generated outputs."
fi