Update README.md #93
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: Check format lint and test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
env: | |
python-version: "3.10" | |
permissions: | |
contents: read | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: 'Set up Python ${{ inputs.python-version }}' | |
with: | |
python-version: ${{ env.python-version }} | |
- uses: actions/cache@v4 | |
id: cache-venv | |
with: | |
path: ./.venv/ | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/dev-requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-venv- | |
- name: 'Create Virtualenv and install Dependencies' | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
pip install -r dev-requirements.txt . | |
- name: "lint-check & test" | |
run: | | |
source .venv/bin/activate | |
poe lint-check | |
poe test |