Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushroshan committed Feb 6, 2024
1 parent 6055f12 commit 611bb75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ jobs:
PLATFORMS: "linux/amd64,linux/arm64"
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Env seen prerun
run: env

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.2
uses: tj-actions/branch-names@@v8

- name: Current branch name
run: |
Expand Down Expand Up @@ -219,6 +219,8 @@ jobs:
run: |
cd services/community
go test -v ./...
mkdir test-results
go test -json > test-results/TestResults.json
- name: Run workshop tests
run: |
Expand All @@ -228,13 +230,13 @@ jobs:
source venv/bin/activate
pip3 install -r requirements.txt
mkdir -p test-results
IS_TESTING=True python3 manage.py test --no-input --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --output-dir test-results
IS_TESTING=True python3 manage.py test --no-input --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner
- name: Run workshop coverage
run: |
cd services/workshop
source venv/bin/activate
coverage run ./manage.py test crapi
IS_TESTING=True coverage run ./manage.py test --no-input crapi
coverage report
coverage xml -o coverage.xml
Expand All @@ -244,6 +246,7 @@ jobs:
with:
files: |
**/test-results/**/*.xml
**/test-results/**/*.json
- name: Publish Coverage Report
if: always()
Expand Down
7 changes: 0 additions & 7 deletions services/workshop/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ python3 manage.py migrate
python3 manage.py check &&\
python3 manage.py health_check

## Uncomment the following line if you wish to run tests
if [ "$RUN_TESTS" = "true" ] || [ "$RUN_TESTS" = "1" ]; then
echo "Running tests"
IS_TESTING=True python3 manage.py test --no-input
echo "Tests finished"
fi

echo "Seeding the database"
python3 manage.py seed_database

Expand Down

0 comments on commit 611bb75

Please sign in to comment.