Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #7

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #7

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI - PR
on:
pull_request:
paths:
- .github/**
- bounciepy/**
- tests/**
- pylintrc
- pytest.ini
- requirements-test.txt
- /*requirements.txt
- run-ci.sh
workflow_dispatch:
jobs:
cache-requirements-install:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Cache pip dependencies
uses: actions/cache@v3
id: cache-dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
pip install -r requirements-test.txt
test:
needs: cache-requirements-install
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Restore pip cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r requirements-test.txt
- name: Test with pytest
run: |
pylint bounciepy/ tests/ && pytest