Skip to content

Commit eb1e321

Browse files
committed
ci: First iteration of pytest
1 parent 850cb36 commit eb1e321

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- refactor_tests
8+
9+
env:
10+
API_KEY: ${{ secrets.ApiKey }}
11+
12+
concurrency:
13+
# Cancels pending runs when a PR gets updated.
14+
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
python-version: ["3.9", "3.10", "3.11"]
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
python -m pip install -r requirements_dev.txt
33+
- name: Run pytest
34+
run: pytest

requirements_dev.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r requirements.txt
2+
pytest>=7.1.2
3+
python-dotenv>=0.20.0

tests/test_pandas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_crossborder_queries(
105105
def test_query_offered_capacity(client, country_code_from, country_code_to, start, end):
106106
contract_marketagreement_type = "A01"
107107
result = client.query_offered_capacity(
108-
country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True
108+
country_code_from, country_code_to, contract_marketagreement_type, start=start, end=end, implicit=True
109109
)
110110
assert not result.empty
111111

0 commit comments

Comments
 (0)