Skip to content

Commit

Permalink
ci: First iteration of pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
fleimgruber committed Jul 30, 2024
1 parent 7204b3c commit db66a09
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ci

on:
pull_request:
push:
branches:
- refactor_tests

env:
API_KEY: ${{ secrets.ApiKey }}

concurrency:
# Cancels pending runs when a PR gets updated.
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
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: |
python -m pip install --upgrade pip
python -m pip install -r requirements_dev.txt
- name: Run pytest
run: pytest
3 changes: 3 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r requirements.txt
pytest>=7.1.2
python-dotenv>=0.20.0
2 changes: 1 addition & 1 deletion tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_crossborder_queries(
def test_query_offered_capacity(client, country_code_from, country_code_to, start, end):
contract_marketagreement_type = "A01"
result = client.query_offered_capacity(
country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True
country_code_from, country_code_to, contract_marketagreement_type, start=start, end=end, implicit=True
)
assert not result.empty

Expand Down

0 comments on commit db66a09

Please sign in to comment.