From ed552cb4c4257112564c085280f69c2afeb31a48 Mon Sep 17 00:00:00 2001 From: Aleksandr Kotlyar Date: Sun, 4 Aug 2024 23:54:50 +0300 Subject: [PATCH] CHORE: update CI actions: fix force Node 20 --- .github/workflows/deploy-mkdocs-poetry.yml | 4 ++-- .github/workflows/linters.yml | 20 ++++++++++---------- .github/workflows/publish.yml | 2 +- .github/workflows/tests.yml | 19 ++++++++++--------- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy-mkdocs-poetry.yml b/.github/workflows/deploy-mkdocs-poetry.yml index f2c8ceaf9..04e86ffc7 100644 --- a/.github/workflows/deploy-mkdocs-poetry.yml +++ b/.github/workflows/deploy-mkdocs-poetry.yml @@ -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 }} diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 44d074572..c01164c8f 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -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: | @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 35a1105a6..ebabb758f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6c077e45c..7abe91882 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -64,10 +65,10 @@ 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 @@ -75,7 +76,7 @@ jobs: 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 @@ -83,17 +84,17 @@ jobs: 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'