Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added self-hosted runner in run system tests workflow #479

Merged
merged 31 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
06010a2
Feat: Added workflows & tox file
MounikaBattu17 Oct 26, 2023
cfd8cbe
Feat: Add run_unit_tests in CI.yml
MounikaBattu17 Oct 26, 2023
afa99f4
Fix: corrected file name
MounikaBattu17 Oct 26, 2023
3cc94cf
Test: Install tox externally & run system tests
MounikaBattu17 Oct 26, 2023
beb4b3b
Fix: Added timeout
MounikaBattu17 Oct 26, 2023
1fcb5b8
Test: Run python version individually
MounikaBattu17 Oct 26, 2023
dc52aa4
Revert: bring back tox changes
MounikaBattu17 Oct 26, 2023
60487b4
Fix: Remove no-extras in tox to ensure tests uses real drivers
MounikaBattu17 Oct 26, 2023
09a23d9
Fix: Change RUNNERNAME
MounikaBattu17 Oct 26, 2023
bcdfe30
Fix: Deleted run_tests.yml
MounikaBattu17 Oct 26, 2023
1f9bdc3
Fix: Refractored tox.ini
MounikaBattu17 Oct 26, 2023
eb51a83
Fix: Added tox to dev dependencies
MounikaBattu17 Oct 26, 2023
ab07a6d
Fix: Remove unnecessary file name additions
MounikaBattu17 Oct 26, 2023
a5bee12
Fix: Removed tox installation in run_system_tests.yml
MounikaBattu17 Oct 26, 2023
f3d42db
Fix: refractor run_unit_test.yml
MounikaBattu17 Oct 26, 2023
08d8e4f
Fix: Removed ProgramW6432 in tox.ini
MounikaBattu17 Oct 26, 2023
8b75874
Merge branch 'main' into users/mounika/add-self-hosted-runner
MounikaBattu17 Oct 26, 2023
efa90ff
Fix: review comments update
MounikaBattu17 Oct 26, 2023
d3d9ff8
Fix: poetry install with version 1.2.2
MounikaBattu17 Oct 27, 2023
93975a4
Test: Let runner be more
MounikaBattu17 Oct 27, 2023
bdbce74
Revert: Changed last commit
MounikaBattu17 Oct 27, 2023
446af54
Test: Set ProgramW6432 variable
MounikaBattu17 Oct 27, 2023
fae9a24
Fix: Do poetry install for tox
MounikaBattu17 Oct 27, 2023
d57b4a9
Test: Let runner be more
MounikaBattu17 Oct 27, 2023
48619ea
Revert: Revert back previous commit
MounikaBattu17 Oct 27, 2023
0150ecb
Test: Without overriding ProgramW6432 in tox
MounikaBattu17 Oct 27, 2023
f294220
Test: Override ProgramW6432 in tox
MounikaBattu17 Oct 27, 2023
885c58f
Fix: Pass the environment varaiables to tox
MounikaBattu17 Oct 27, 2023
a9ebce1
Fix: Removed unneccessary env passing in jobs
MounikaBattu17 Oct 27, 2023
1ba137d
GitHub workflow: Revert unnecessary change
bkeryan Oct 27, 2023
86a84f3
tox: Pass ProgramData env var
bkeryan Oct 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ jobs:
check_examples:
name: Check examples
uses: ./.github/workflows/check_examples.yml
run_tests:
name: Run tests
uses: ./.github/workflows/run_tests.yml
run_unit_tests:
name: Run unit tests
uses: ./.github/workflows/run_unit_tests.yml
needs: [check_nims, check_nimg]
run_system_tests:
name: Run system tests
uses: ./.github/workflows/run_system_tests.yml
needs: [run_unit_tests]
report_test_results:
name: Report test results
uses: ./.github/workflows/report_test_results.yml
needs: [run_tests]
needs: [run_unit_tests, run_system_tests]
if: always()
34 changes: 34 additions & 0 deletions .github/workflows/run_system_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run system tests

on:
workflow_call:
workflow_dispatch:

jobs:
run_system_tests:
name: Run system tests
runs-on:
- self-hosted
- windows
- x64
- rdss-measlinkbot-win-10-${{ matrix.configuration }}
strategy:
matrix:
configuration: ["py32", "py64"]
# Fail-fast skews the pass/fail ratio and seems to make pytest produce
# incomplete JUnit XML results.
fail-fast: false
timeout-minutes: 90
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Install dependencies
run: poetry install
- name: Run system tests
run: poetry run tox
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: test_results
path: test_results/*.xml
if: always()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run tests
name: Run unit tests

on:
workflow_call:
Expand All @@ -8,8 +8,8 @@ env:
POETRY_VERSION: 1.2.2

jobs:
run_tests:
name: Run tests
run_unit_tests:
name: Run unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -36,12 +36,12 @@ jobs:
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install ni-measurementlink-service (no extras)
run: poetry install -v
- name: Run tests and code coverage (ni-measurementlink-service, no extras)
run: poetry run pytest ./tests -v --cov=ni_measurementlink_service --junitxml=test_results/nims-${{ matrix.os }}-py${{ matrix.python-version}}-no-extras.xml
- name: Run unit tests and code coverage (ni-measurementlink-service, no extras)
run: poetry run pytest ./tests/unit -v --cov=ni_measurementlink_service --junitxml=test_results/nims-${{ matrix.os }}-py${{ matrix.python-version}}-no-extras.xml
- name: Install ni-measurementlink-service (all extras)
run: poetry install -v --all-extras
- name: Run tests and code coverage (ni-measurementlink-service, all extras)
run: poetry run pytest ./tests -v --cov=ni_measurementlink_service --junitxml=test_results/nims-${{ matrix.os }}-py${{ matrix.python-version}}-all-extras.xml
- name: Run unit tests and code coverage (ni-measurementlink-service, all extras)
run: poetry run pytest ./tests/unit -v --cov=ni_measurementlink_service --junitxml=test_results/nims-${{ matrix.os }}-py${{ matrix.python-version}}-all-extras.xml
- name: Install ni-measurementlink-generator
run: poetry install -v
working-directory: ./ni_measurementlink_generator
Expand Down
Loading