Skip to content

feat: add github action #1

feat: add github action

feat: add github action #1

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