Skip to content

Commit

Permalink
feat: add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
herve.le-bars committed Mar 5, 2024
1 parent db47f32 commit cb3c780
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/version_supports.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: version supports

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2

- name: Install poetry
run: |
python -m pip install poetry
poetry export --with dev --format=requirements.txt --output=requirements.txt
- name: set PY
run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/[email protected]

check_python38:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install poetry
run: |
python -m pip install poetry
poetry export --with dev --format=requirements.txt --output=requirements.txt

0 comments on commit cb3c780

Please sign in to comment.