-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 changed file
with
29 additions
and
0 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,29 @@ | ||
name: Build and test python-libssh | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '38 4 5 * *' | ||
|
||
jobs: | ||
build: | ||
name: Run tests in container | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ fedora-33 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set the right OS in the Dockerfile | ||
run: sed -i "s#^FROM.*#FROM $( echo ${{ matrix.os }} | sed 's#^fedora-#registry.fedoraproject.org/fedora:#' )#" tests/Dockerfile | ||
- name: Build image | ||
run: docker build -t python-libssh -f tests/Dockerfile . | ||
- name: Run container | ||
run: docker run --name python-libssh --rm -d python-libssh | ||
- name: Run tests in the container | ||
run: docker exec python-libssh python3 setup.py test | ||
- name: Run tests with installed rpm | ||
run: docker exec python-libssh bash -c 'cp -rp tests /tmp/tests && cd /tmp/tests && for i in *.py ; do python3 $i ; done' |