Build(deps): Bump actions/checkout from 3 to 4 #346
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test pull request | |
on: | |
pull_request: | |
jobs: | |
pylint: | |
name: Lint code | |
runs-on: ubuntu-latest | |
if: | |
( | |
contains(github.event.pull_request.labels.*.name, 'dependencies') == false && | |
github.base_ref == 'main' | |
) || | |
contains(github.event.pull_request.labels.*.name, 'ci') == true | |
steps: | |
- name: Checkout Main | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint | |
- name: Analysing the code with pylint | |
run: | | |
pylint $(git ls-files '*.py') --rcfile=.pylintrc --fail-under=9 | |
test_code_block: | |
name: Test code block | |
runs-on: ubuntu-latest | |
if: | |
( | |
contains(github.event.pull_request.labels.*.name, 'dependencies') == false && | |
github.base_ref == 'main' | |
) || | |
contains(github.event.pull_request.labels.*.name, 'ci') == true | |
steps: | |
- name: Checkout Main | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
id: python | |
with: | |
python-version: '3.x' | |
cache: 'pip' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: ~/.local | |
key: ${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements.txt') }} | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r requirements.txt --user --no-warn-script-location | |
- name: Test | |
run: | |
python3 ./ci/test_code_block.py | |
test: | |
name: Test documentation | |
if: | |
( | |
contains(github.event.pull_request.labels.*.name, 'dependencies') == false && | |
github.base_ref == 'main' | |
) || | |
contains(github.event.pull_request.labels.*.name, 'ci') == true | |
uses: ./.github/workflows/build.yml | |
with: | |
build-type: build | |
deploy: false |