Skip to content

ci: Add examples testing & Move Ruff and Black to pre-commit #109

ci: Add examples testing & Move Ruff and Black to pre-commit

ci: Add examples testing & Move Ruff and Black to pre-commit #109

Workflow file for this run

name: build
on:
push:
branches:
- main
- release**
paths-ignore:
- '**.md'
- '**.rst'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
# This will cancel previous run if a newer job that obsoletes the said previous
# run, is started.
# Based on https://github.com/zulip/zulip/commit/4a11642cee3c8aec976d305d51a86e60e5d70522
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
python-version: ["3.12"]

Check failure on line 27 in .github/workflows/build_lint.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/build_lint.yml (Line: 27, Col: 9): Unexpected value 'python-version'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install mesa
- name: Test with pytest
run: pytest tests/
lint-ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install ruff==0.0.275
- name: Lint with ruff
# Include `--format=github` to enable automatic inline annotations.
# Use settings from pyproject.toml.
run: ruff . --format=github
lint-black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install black[jupyter]
- name: Lint with black
run: black --check .