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

fix(test): Remove unused testrail reporting from nightly builds #1476

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 0 additions & 55 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,58 +244,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

testrail-reporting-nightly:
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'schedule' || startsWith(github.head_ref, 'testrail') }}
strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
# - "3.8" # Testrail has errors when running on python 3.8; Skipping
os: [ubuntu-latest]
fail-fast: false

steps:
- uses: actions/checkout@v4
- name: Setup py-shiny
uses: ./.github/py-shiny/setup
with:
python-version: ${{ matrix.python-version }}

- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: npm
cache-dependency-path: examples/brownian/shinymediapipe/package-lock.json
- name: Install node.js package
working-directory: examples/brownian/shinymediapipe
run: |
npm ci

- name: Run End-to-End tests
timeout-minutes: 20
run: |
make testrail-junit
- name: Report results to Testrail
env:
TESTRAIL_URL: "https://posit.testrail.io"
TESTRAIL_PROJECT: "Shiny-Python"
TESTRAIL_USER: "${{ secrets.TESTRAIL_USER }}"
TESTRAIL_PASSWORD: "${{ secrets.TESTRAIL_PASSWORD }}"
run: |
CURRENT_DATE="$(date +'%Y-%m-%d %H:%M:%S') Nightly tests"
trcli \
--yes \
--host "$TESTRAIL_URL" \
--project "$TESTRAIL_PROJECT" \
--username "$TESTRAIL_USER" \
--password "$TESTRAIL_PASSWORD" \
parse_junit \
--file "report.xml" \
--title "$CURRENT_DATE" \
--close-run
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://www.gnu.org/software/make/manual/make.html#Phony-Targets
# Prerequisites of .PHONY are always interpreted as literal target names, never as patterns (even if they contain ‘%’ characters).
# # .PHONY: help clean% check% format% docs% lint test pyright playwright% install% testrail% coverage release js-*
# # .PHONY: help clean% check% format% docs% lint test pyright playwright% install% coverage release js-*
# Using `FORCE` as prerequisite to _force_ the target to always run; https://www.gnu.org/software/make/manual/make.html#index-FORCE
FORCE: ;

Expand Down Expand Up @@ -152,9 +152,6 @@ PYTEST_DEPLOYS_BROWSERS:= --browser chromium
install-playwright: FORCE
playwright install --with-deps

install-trcli: FORCE
$(if $(shell which trcli), @echo -n, $(shell pip install trcli))

install-rsconnect: FORCE
pip install git+https://github.com/rstudio/rsconnect-python.git#egg=rsconnect-python

Expand Down Expand Up @@ -182,10 +179,6 @@ playwright-deploys: install-rsconnect
playwright-examples: FORCE
$(MAKE) playwright TEST_FILE="tests/playwright/examples/$(SUB_FILE)"

# end-to-end tests with playwright and generate junit report
testrail-junit: install-playwright install-trcli
pytest tests/playwright/shiny/$(SUB_FILE) --junitxml=report.xml $(PYTEST_BROWSERS)

coverage: FORCE ## check combined code coverage (must run e2e last)
pytest --cov-report term-missing --cov=shiny tests/pytest/ tests/playwright/shiny/$(SUB_FILE) $(PYTEST_BROWSERS)
coverage html
Expand Down
Loading