Skip to content

Commit

Permalink
tests: Start using github actions
Browse files Browse the repository at this point in the history
Previously we did use travis, however since we are being now required to
subscribe to a paid plan to cover our tests we will switch to GitHub
Actions.

Signed-off-by: Vinzenz Feenstra <[email protected]>
  • Loading branch information
vinzenz authored and pirat89 committed Jul 2, 2021
1 parent 934261b commit 5f2bf22
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Unit Tests
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Run unit tests in containers
runs-on: ubuntu-latest
strategy:
matrix:
python:
- python3.6
- python2.7

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Run tests @ ${{matrix.python}}
run: script -e -c /bin/bash -c 'TERM=xterm docker build -t leapp-tests -f utils/docker-tests/Dockerfile utils/docker-tests && PYTHON_VENV=${{matrix.python}} docker run --rm -ti -v ${PWD}:/payload --env=PYTHON_VENV leapp-tests'
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ install:

jobs:
include:
- script:
- docker run --env CI=$CI --rm -ti -v ${PWD}:/payload --env=PYTHON_VENV leapp-tests
env: PYTHON_VENV=python2.7
- script:
- docker run --env CI=$CI --rm -ti -v ${PWD}:/payload --env=PYTHON_VENV leapp-tests
env: PYTHON_VENV=python3.6
- stage: deploy
script:
- docker run --env CI=$CI --rm -ti -v ${PWD}:/payload --entrypoint "/bin/bash" leapp-tests -c "make install-deps && make dashboard_data"
Expand Down

0 comments on commit 5f2bf22

Please sign in to comment.