Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
175 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
aptget_update() | ||
{ | ||
if [ ! -z $1 ]; then | ||
echo "" | ||
echo "Retrying apt-get update..." | ||
echo "" | ||
fi | ||
output=`sudo apt-get update 2>&1` | ||
echo "$output" | ||
if [[ $output == *[WE]:\ * ]]; then | ||
return 1 | ||
fi | ||
} | ||
|
||
aptget_update || aptget_update retry || aptget_update retry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["2.7", "3.6", "3.7"] | ||
django-version: ["1.11", "2.2"] | ||
grappelli: ["0", "1"] | ||
s3: ["0", "1"] | ||
exclude: | ||
- python-version: "2.7" | ||
django-version: "2.2" | ||
- grappelli: "1" | ||
s3: "1" | ||
- python-version: "3.7" | ||
django-version: "1.11" | ||
- python-version: "3.8" | ||
django-version: "1.11" | ||
- python-version: "3.6" | ||
s3: "1" | ||
include: | ||
- python-version: "2.7" | ||
python-bin: python2 | ||
- python-version: "3.6" | ||
python-bin: python3 | ||
- python-version: "3.7" | ||
python-bin: python3 | ||
- s3: "1" | ||
name-suffix: " with S3 storage" | ||
- grappelli: "1" | ||
name-suffix: " with grappelli" | ||
- s3: "0" | ||
grappelli: "0" | ||
name-suffix: "" | ||
|
||
runs-on: ubuntu-latest | ||
name: Django ${{ matrix.django-version }}${{ matrix.name-suffix }} (Python ${{ matrix.python-version }}) | ||
|
||
env: | ||
DJANGO: ${{ matrix.django-version }} | ||
GRAPPELLI: ${{ matrix.grappelli }} | ||
S3: ${{ matrix.s3 }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup chromedriver | ||
uses: nanasess/setup-chromedriver@v1.0.5 | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo .github/workflows/apt-get-update.sh | ||
sudo apt-get install -y exempi gifsicle | ||
- name: Install tox | ||
run: | | ||
${{ matrix.python-bin }} -m pip install tox tox-gh-actions | ||
- name: Run tests | ||
run: | | ||
tox -- -v --selenosis-driver=chrome-headless || \ | ||
tox -- -v --selenosis-driver=chrome-headless || \ | ||
tox -- -v --selenosis-driver=chrome-headless | ||
- name: Upload junit xml | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: junit-reports | ||
path: reports/*.xml | ||
|
||
- name: Combine coverage | ||
run: tox -e coverage-report | ||
|
||
- name: Upload coverage | ||
run: tox -e codecov | ||
env: | ||
CODECOV_NAME: ${{ github.workflow }} | ||
|
||
report: | ||
if: always() | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: "Report Test Results" | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: junit-reports | ||
|
||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1.8 | ||
if: always() | ||
with: | ||
files: ./*.xml | ||
report_individual_runs: true | ||
|
||
success: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Test Successful | ||
steps: | ||
- name: Success | ||
run: echo Test Successful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ ghostdriver.log | |
test/media | ||
dist/ | ||
.coverage | ||
/reports/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters