Fix LTI Tool linter errors #409
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
name: tests | |
on: [push] | |
jobs: | |
docker-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
id: imgcache | |
with: | |
path: .docker-img.tar | |
key: v2-${{ hashFiles('.github/workflows/Dockerfile', 'requirements_testing.txt', 'requirements.txt') }} | |
# we stop here if the docker image was found in a cache | |
- uses: actions/cache@v2 | |
with: | |
path: .docker-cache | |
key: v2-${{ hashFiles('.github/workflows/Dockerfile', 'requirements_testing.txt', 'requirements.txt') }} | |
if: steps.imgcache.outputs.cache-hit != 'true' | |
- uses: docker/setup-buildx-action@v1.3.0 | |
if: steps.imgcache.outputs.cache-hit != 'true' | |
- run: docker buildx build -t testimg --output type=docker,dest=.docker-img.tar --cache-to type=local,dest=.docker-cache2,mode=max --cache-from type=local,src=.docker-cache -f .github/workflows/Dockerfile . | |
if: steps.imgcache.outputs.cache-hit != 'true' | |
- run: rm -rf .docker-cache | true | |
if: steps.imgcache.outputs.cache-hit != 'true' | |
- run: mv .docker-cache2 .docker-cache | |
if: steps.imgcache.outputs.cache-hit != 'true' | |
unit-tests: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: .docker-img.tar | |
key: v2-${{ hashFiles('.github/workflows/Dockerfile', 'requirements_testing.txt', 'requirements.txt') }} | |
- run: docker load -i .docker-img.tar | |
- run: docker run -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} testimg bash -c 'python3 manage.py compilemessages && python3 manage.py test' | |
selenium-tests: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: .docker-img.tar | |
key: v2-${{ hashFiles('.github/workflows/Dockerfile', 'requirements_testing.txt', 'requirements.txt') }} | |
- run: docker load -i .docker-img.tar | |
- run: docker run -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} testimg bash -c 'python3 manage.py compilemessages && selenium_test/run_servers_and_tests.sh' |