-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1020 from VisLab/test_branch
Minor updates to test file data
- Loading branch information
Showing
88 changed files
with
6,540 additions
and
6,434 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 |
---|---|---|
|
@@ -48,92 +48,24 @@ jobs: | |
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('docs/requirements.txt') }} | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade --upgrade-strategy eager pip | ||
pip install flake8 | ||
pip install coverage | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --show-source --statistics --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
- name: Test with unittest | ||
# Run spec tests without coverage for non Python 3.9 | ||
- name: Run spec_test | ||
env: | ||
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
coverage run -m unittest | ||
continue-on-error: true | ||
run: | | ||
python -m unittest discover spec_tests | ||
- name: Run spec_test coverage | ||
# Run unittest without coverage | ||
- name: Test with unittest | ||
env: | ||
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: coverage run --append -m unittest spec_tests/test_errors.py | ||
continue-on-error: true | ||
|
||
- name: Archive code coverage results | ||
if: ${{matrix.python-version == '3.9'}} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
path: .coverage | ||
|
||
check-secret: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
secrets-exist: ${{ steps.check-for-secrets.outputs.defined }} | ||
steps: | ||
- name: Check for Secret availability | ||
id: check-for-secrets | ||
# perform secret check & put boolean result as an output | ||
shell: bash | ||
run: | | ||
if [ "${{ secrets.CC_TEST_REPORTER_ID }}" != '' ]; then | ||
echo "defined=true" >> $GITHUB_OUTPUT; | ||
else | ||
echo "defined=false" >> $GITHUB_OUTPUT; | ||
fi | ||
coverage: | ||
name: Publish coverage | ||
needs: [build, check-secret] | ||
runs-on: ubuntu-latest | ||
if: needs.check-secret.outputs.secrets-exist == 'true' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('docs/requirements.txt') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade --upgrade-strategy eager pip | ||
pip install flake8 | ||
pip install coverage | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
- name: Download a single artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
|
||
- name: publish-coverages | ||
with: | ||
coverageCommand: coverage xml | ||
debug: true | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
|
||
python -m unittest discover tests |
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,79 @@ | ||
name: CI_COV | ||
|
||
on: | ||
push: | ||
branches: ["*"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
jobs: | ||
|
||
check-secret: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
secrets-exist: ${{ steps.check-for-secrets.outputs.defined }} | ||
steps: | ||
- name: Check for Secret availability | ||
id: check-for-secrets | ||
# perform secret check & put boolean result as an output | ||
shell: bash | ||
run: | | ||
if [ "${{ secrets.CC_TEST_REPORTER_ID }}" != '' ]; then | ||
echo "defined=true" >> $GITHUB_OUTPUT; | ||
else | ||
echo "defined=false" >> $GITHUB_OUTPUT; | ||
fi | ||
build: | ||
needs: check-secret | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest] | ||
python-version: [ "3.9" ] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade --upgrade-strategy eager pip | ||
pip install flake8 coverage -r requirements.txt -r docs/requirements.txt | ||
# Run flake8 | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 . --count --show-source --statistics --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
# Run unittest with coverage | ||
- name: Test with unittest and coverage | ||
env: | ||
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
continue-on-error: true | ||
run: | | ||
coverage run -m unittest discover tests | ||
# Run spec tests with coverage | ||
- name: Run spec_test coverage | ||
env: | ||
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
coverage run --append -m unittest discover spec_tests | ||
coverage xml | ||
ls -la | ||
# Upload coverage to Code Climate | ||
- name: Upload coverage to Code Climate | ||
if: needs.check-secret.outputs.secrets-exist == 'true' | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ def main(): | |
return 1 | ||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) | ||
sys.exit(main()) |
Oops, something went wrong.