Merge pull request #1 from spraakbanken/setup-uv #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code generated by internal/ci/github/ci_tool.cue; DO NOT EDIT. | |
name: check | |
"on": | |
push: | |
branches: | |
- main | |
pull_request: null | |
merge_group: null | |
permissions: | |
contents: read | |
env: | |
MINIMUM_PYTHON_VERSION: "3.9" | |
UV_VERSION: 0.5.15 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
name: ubuntu / 3.9 / fmt | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: ${{ env.UV_VERSION }} | |
enable-cache: true | |
- name: Install dependencies | |
run: make install-dev | |
- name: check formatting | |
run: make check-fmt | |
lint: | |
runs-on: ubuntu-latest | |
name: ubuntu / 3.9 / lint | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: ${{ env.UV_VERSION }} | |
enable-cache: true | |
- name: Install dependencies | |
run: make install-dev | |
- name: lint code | |
run: make lint | |
type-check: | |
runs-on: ubuntu-latest | |
name: ubuntu / 3.9 / type-check | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: ${{ env.MINIMUM_PYTHON_VERSION }} | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: ${{ env.UV_VERSION }} | |
enable-cache: true | |
- name: Install dependencies | |
run: make install-dev | |
- name: type-check code | |
run: make type-check | |
check-check: | |
if: always() | |
needs: | |
- fmt | |
- lint | |
- type-check | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |