Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/lint_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
push:
branches:
- main
- dev
- staging
- production
paths:
- 'src/**'
Expand Down Expand Up @@ -34,45 +32,43 @@

jobs:
lint:
name: ruff (check code style)
# NOTE: We use an ubuntu runner to not be dependent on possibly limited digs infra
# for this tiny linting job. This means we can have many lint jobs accross repos in parallel.
name: ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Extract ruff version from pyproject.toml
run: |
echo "RUFF_VERSION=$(grep -E 'ruff.*=' pyproject.toml | sed -E 's/.*\"ruff==([^\"]+)\".*/\1/')" >> $GITHUB_ENV
echo "Extracted Ruff version: ${{ env.RUFF_VERSION }}"
- name: Install ruff
run: pip install ruff==${{ env.RUFF_VERSION }}
- name: ruff format (check code formatting)
run: ruff format --diff
- name: ruff check (lint code base)
run: ruff check src tests

test_digs:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: pytest (run tests)
name: pytest (jojo)
runs-on: [jojo]
timeout-minutes: 30
needs: lint
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- name: Run tests
run: |
export N_CPU=8
srun --chdir=$PWD -p cpu -c $N_CPU -t 00:30:00 --mem=32G bash ./.github/ci/run_tests.sh
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml

test_github:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: pytest (github)
runs-on: ubuntu-latest
timeout-minutes: 45
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ tests/test_outputs
dev.py
dev.ipynb
_version.py
tinker/
tinker/
.DS_Store
Loading