Skip to content

Commit

Permalink
CHORE: update CI actions: fix force Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-kotlyar committed Aug 4, 2024
1 parent 3bc8f6c commit 73cd235
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-mkdocs-poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
Black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- run: |
Expand All @@ -51,8 +51,8 @@ jobs:
name: Lint Pycodestyle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Pycodestyle
Expand All @@ -64,8 +64,8 @@ jobs:
name: Lint Pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Pylint
Expand All @@ -77,8 +77,8 @@ jobs:
name: Lint Pylint Full Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Pylint Full Report
Expand All @@ -92,8 +92,8 @@ jobs:
name: Mypy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Mypy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abatilo/actions-poetry@v2

- name: Bump version
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ jobs:
python-version: [ '3.8', '3.11' ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: technote-space/get-diff-action@v6
- uses: tj-actions/changed-files@v44
id: changed-files
with:
PATTERNS: |
+(selene|tests)/**/*.py
Expand All @@ -64,36 +65,36 @@ jobs:
tests.yml
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
if: env.GIT_DIFF
if: steps.changed-files.outputs.any_changed == 'true'

# can be packaged as Docker-image
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
if: env.GIT_DIFF
if: steps.changed-files.outputs.any_changed == '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: env.GIT_DIFF
if: steps.changed-files.outputs.any_changed == '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: env.GIT_DIFF
if: steps.changed-files.outputs.any_changed == 'true'

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

0 comments on commit 73cd235

Please sign in to comment.