Skip to content

First draft of instructions files for GitHub Copilot for UG-ANTS. #16

First draft of instructions files for GitHub Copilot for UG-ANTS.

First draft of instructions files for GitHub Copilot for UG-ANTS. #16

Workflow file for this run

name: CI Code Style
on:
pull_request:
branches: main
push:
branches: main
workflow_dispatch:
# Limit concurrently running workflow for a specific pull request.
# Cancel and resubmit if a new push is made. See GitHub docs:
# https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-style:
name: Run code style checks
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.lock
environment-name: ci-env
cache-environment: true
- name: Run black
id: black
run: black --check .
shell: micromamba-shell {0}
continue-on-error: true
- name: Run ruff
id: ruff
run: ruff check .
shell: micromamba-shell {0}
continue-on-error: true
- name: Collect failures
if: |
steps.black.outcome == 'failure' ||
steps.ruff.outcome == 'failure'
env:
BLACK_OUTCOME: ${{ steps.black.outcome }}
RUFF_OUTCOME: ${{ steps.ruff.outcome }}
run: |
echo "One or more code style checks failed:"
echo "black: $BLACK_OUTCOME"
echo "ruff: $RUFF_OUTCOME"
echo "See the logs for the failed checks for more details"
exit 1