Skip to content

Merge pull request #433 from opensafely-core/dependabot/pip/ruff-0.8.1 #686

Merge pull request #433 from opensafely-core/dependabot/pip/ruff-0.8.1

Merge pull request #433 from opensafely-core/dependabot/pip/ruff-0.8.1 #686

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "opensafely-core/setup-action@v1"
with:
python-version: "3.11"
install-just: true
- name: Check formatting, linting and import sorting
run: just check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "opensafely-core/setup-action@v1"
with:
python-version: "3.11"
install-just: true
- name: Run tests
run: just test
test-package-build:
runs-on: ubuntu-20.04
name: Test we can build a Python package
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "opensafely-core/setup-action@v1"
with:
python-version: "3.11"
install-just: true
- name: Check the wheel installs and runs
run: just package-test wheel
- name: Check the sdist installs and runs
run: just package-test sdist
tag-new-version:
needs: [check, test, test-package-build]
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Tag new release
run: |
# ignore failures here to avoid merges into main without version
# bumps failing this job.
git tag "v$(cat version)" || exit 0
git push --tags
required-checks:
if: always()
needs:
- check
- test-package-build
- test
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}