Formatting/checking/test setup fixes #6
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
name: Lint and test | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
lint_and_test: | |
name: Lint and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install python dependencies | |
run: | | |
python3 -m venv venv | |
venv/bin/pip install -r requirements.txt | |
- name: Check syntax and formatting | |
run: | | |
venv/bin/ruff check threedi_scenario_downloader | |
venv/bin/ruff format threedi_scenario_downloader | |
- name: Run pytest | |
run: | | |
echo ${{ secrets.TEST_API_KEY }} > test_api_key.txt | |
venv/bin/pytest |