-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Tests and Automate Testing with GitHub Actions (#37)
* Add Python 3.11 metadata classifier * Add basic tox config * separate testing dependencies dev extras includes testing deps * blacken code * initial tox config * remove tox parallel * test github actions tox * fix typo * fix yaml format * Remove python 3.11 support Ray will not support until 2.3: https://github.com/ray-project/ray/milestone/104 * add github actions tests badge * rename tests action * remove outdated dockerized test environment * test check for docker image updates * test run on push (temp) * fix parent action name * fix ghcr link * temp hardcode image version * test get image version * fix updatecheck output name * test fix URL * fix jq typo * test env var * attempt fix auth * test -H auth * test auth with step * Revert "test auth with step" This reverts commit 99c6de4. * move auth to first step * consolidate steps * Revert "consolidate steps" This reverts commit cc81755. * add permissions key * testing gh secrets * add gh auth to increment version * testing * test use secret directly * try write-all perms * try cli login * try new token * try defaults * attempt container auto-update * attempt fix docker build context * use environment variables * lowercase package URL * only update secret on success * env increment fix * rename actions * temp disable package publishing * try other fork update checker * Update mock RSA * temp disable workflow on push * improve mock RSA handling * fix string formatting when passing integer values * replace generic exception with ValueError * raise ValueError for invalid attenuation settings * move RSA-universal constants to file * update mock RSA * improve mock analyzer handling * update iqstream mocks * update scos_actions for testing * revert actions version * fix mock IQ stream failure * force num_samples integer input * write tests for sigan interface * disable scheduled image auto-update * disable automatic image updates * Add more checks to calibration loading * remove unused import * update isort to fix pre-commit CI * switch ubuntu testing version to 20.04 * add concurrency to reduce duplicate testing * modify pytest command * fix CI test badge link * test bandit security CI * adjust runs-on for bandit CI and add concurrency handling * Add CodeQL action config * remove dead code * rename tox action * remove tox testing on ubuntu-latest * fix workflow triggering on branches * update tox job naming * try custom bandit action * remove bandit config from pyproject.toml * only run bandit on src directory * add assertion to make bandit warn * remove bandit matrix strategy * remove CodeQL action * remove pyproject bandit requirement * bandit ci optional deps * remove bandit testing code should resolve open bot comment on PR * test building docker image on dockerfile modified * fix typo * Only run tox on src/tests changes * Only build docker image on dockerfile modified * also build image on PR editing dockerfile * Bandit and Tox on PR only when python modified * Update README.md * remove unused dependency * Remove Bandit CI * Delete auto-update-parent-image.yaml * update unit tests for upstream changes * add Python 3.11 to testing suite * update test and dev dependencies * Sync minimum tox versions for local testing and CI testing * Rewrite unit test for IQ capture retry
- Loading branch information
1 parent
68233dd
commit 9666495
Showing
12 changed files
with
543 additions
and
153 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,28 @@ | ||
name: Build Docker Image | ||
|
||
# Run when Dockerfile is edited | ||
on: | ||
push: | ||
paths: | ||
- docker/Dockerfile | ||
pull_request: | ||
paths: | ||
- docker/Dockerfile | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-docker-image: | ||
name: Build tekrsa_usb Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Build tekrsa_usb Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: false | ||
tags: tekrsa_usb | ||
file: ./docker/Dockerfile |
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,54 @@ | ||
name: Tox | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src | ||
- tests | ||
- pyproject.toml | ||
- tox.ini | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- src | ||
- tests | ||
- pyproject.toml | ||
- tox.ini | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run-all-tests: | ||
name: Py${{ matrix.py }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-20.04 | ||
py: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
steps: | ||
- name: Set up Python ${{ matrix.py }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Checkout scos-tekrsa | ||
uses: actions/checkout@v3 | ||
- name: Install tox-gh | ||
run: python -m pip install tox-gh | ||
- name: Set up test suite | ||
run: tox r -vv --notest | ||
- name: Run test suite | ||
run: tox r --skip-pkg-install | ||
env: | ||
PYTEST_ADDOPTS: "-vv --durations=0" |
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ docker/libcyusb_shared.so | |
*.egg-info | ||
dist | ||
.coverage | ||
.tox |
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
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
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
Oops, something went wrong.