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

CHORE: fix changed files #560

Merged
Merged
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
17 changes: 8 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,43 +58,42 @@ jobs:
- uses: tj-actions/changed-files@v44
id: changed-files
with:
PATTERNS: |
+(selene|tests)/**/*.py
FILES: |
files: |
poetry.lock
tests.yml
**/tests.yml
{selene,tests}/**/*.py

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
if: steps.changed-files.outputs.any_changed == 'true'
if: steps.changed-files.outputs.any_modified == 'true'

# can be packaged as Docker-image
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
if: steps.changed-files.outputs.any_changed == 'true'
if: steps.changed-files.outputs.any_modified == 'true'

# can be packaged as Docker-image; p.s.: no need to install chrome or firefox on github-actions
- name: Install xvfb
run: |
sudo apt-get update
sudo apt-get install xvfb
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
if: steps.changed-files.outputs.any_changed == 'true'
if: steps.changed-files.outputs.any_modified == 'true'

- name: Tests
run: |
poetry run pytest -sv --cov-config .coveragerc --cov-report html:skip-covered --cov-report term:skip-covered --cov=selene --cov-report xml:coverage.xml --tb=short tests/ --headless=True
mkdir -p Artifacts/skip-covered
cp -r skip-covered Artifacts/skip-covered
if: steps.changed-files.outputs.any_changed == 'true'
if: steps.changed-files.outputs.any_modified == 'true'

- name: Code Coverage
uses: codecov/codecov-action@v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: steps.changed-files.outputs.any_changed == 'true'
if: steps.changed-files.outputs.any_modified == 'true'
Loading