Skip to content

Commit

Permalink
Configure tests CI job to run tests in Docker container #133
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Nov 12, 2024
1 parent 445d618 commit 4f5803e
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,11 @@ jobs:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.11'

- name: Add apt repo
run: sudo add-apt-repository universe

- name: Create logging configuration file
run: cp scigateway_auth/logging.example.ini scigateway_auth/logging.ini

- name: Install Nox
run: pip install nox==2024.10.9

- name: Install Poetry
run: pip install poetry==1.8.4
- name: Run tests
run: |
docker build -f Dockerfile -t scigateway-auth:test --target test
docker run --name scigatewau-auth-container scigateway-auth:test pytest --config-file test/pytest.ini --cov scigateway_auth --cov-report xml
# Run Nox tests session, saves and uploads a coverage report to codecov
- name: Run Nox tests session
run: nox -s tests -- --cov=scigateway_auth --cov-report=xml
- name: Upload code coverage report
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4

Expand Down

0 comments on commit 4f5803e

Please sign in to comment.