Skip to content

Commit

Permalink
Create CI.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
aclerc committed Apr 22, 2024
0 parents commit 7ea7ed6
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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

0 comments on commit 7ea7ed6

Please sign in to comment.