Skip to content

Commit

Permalink
enable unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ddl-cedricyoung committed Aug 21, 2024
1 parent c3ba50d commit 7b22151
Showing 1 changed file with 47 additions and 24 deletions.
71 changes: 47 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,52 @@ on:
branches: [main]

jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# - name: Install depedencies
# run: |
# pip install poetry
# poetry install --no-ansi
# - uses: pre-commit/[email protected]
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install depedencies
run: |
pip install poetry
poetry install --no-ansi
- uses: pre-commit/[email protected]

# API-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# - name: Install depedencies
# run: |
# pip install poetry
# poetry install --no-ansi
# - name: unit tests
# run: |
# poetry run coverage run -m pytest --junit-xml=results/unit-tests.xml
unit-tests:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install depedencies
run: |
pip install poetry
poetry install --no-ansi
- name: unit tests
run: |
poetry run coverage run -m pytest --junit-xml=output/unit-tests.xml
- name: package results
if: always()
run: |
mkdir -p output
mv .coverage.* output/
tar cvfz output.tgz output
- name: save output
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-tests
path: output.tgz
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "unit results"
files: |
output/unit-tests.xml
UI-tests:
cucu-tests:
needs: unit-tests
runs-on: ubuntu-latest
permissions: # to publish junit results - see https://github.com/EnricoMi/publish-unit-test-result-action?tab=readme-ov-file#permissions
contents: read
Expand Down Expand Up @@ -73,9 +94,11 @@ jobs:
DISPLAY: :99 # Needed for headless mode
SELENIUM_HOST: localhost
SELENIUM_PORT: 4444
- name: tar results
- name: package results
if: always()
run: |
mkdir -p output
mv .coverage.* output/
tar cvfz output.tgz output
- name: save output
if: always()
Expand Down

0 comments on commit 7b22151

Please sign in to comment.