diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..3636711 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..449fb2c --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,3 @@ +-r requirements.txt +pytest>=7.1.2 +python-dotenv>=0.20.0 \ No newline at end of file diff --git a/tests/test_pandas.py b/tests/test_pandas.py index 43f9073..239ad4b 100644 --- a/tests/test_pandas.py +++ b/tests/test_pandas.py @@ -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