-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
8 changed files
with
125 additions
and
103 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,82 @@ | ||
name: Tests | ||
|
||
on: | ||
|
||
# On which repository actions to trigger the build. | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# Allow job to be triggered manually. | ||
workflow_dispatch: | ||
|
||
# Cancel in-progress jobs when pushing to the same branch. | ||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
|
||
tests: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
||
# Run all jobs to completion (false), or cancel | ||
# all jobs once the first one fails (true). | ||
fail-fast: true | ||
|
||
# Define a minimal test matrix, it will be | ||
# expanded using subsequent `include` items. | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.10"] | ||
bare: [false] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
BARE: ${{ matrix.bare }} | ||
|
||
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} ${{ matrix.bare && '(bare)' || '' }} | ||
steps: | ||
|
||
- name: Acquire sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install prerequisites (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
- name: Install project dependencies (Baseline) | ||
run: | | ||
pip install -r requirements.txt -r dev-requirements.txt | ||
# For saving resources, code style checking is | ||
# only invoked within the `bare` environment. | ||
- name: Check code style | ||
if: matrix.bare == true | ||
run: | | ||
flake8 ultrasync --count --show-source --statistics | ||
- name: Run tests | ||
run: | | ||
coverage run -m pytest ultrasync | ||
- name: Process coverage data | ||
run: | | ||
coverage xml | ||
coverage report | ||
- name: Upload coverage data | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./coverage.xml | ||
fail_ci_if_error: false | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
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
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