Merge pull request #67 from climatepolicyradar/fix/minify-main-requir… #360
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: pre-commit-checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Set git config to use personal access token in secrets | |
run: | | |
git config --global url."https://${{secrets.PERSONAL_ACCESS_TOKEN}}@github.com/climatepolicyradar/explorer.git".insteadOf "https://github.com/climatepolicyradar/explorer.git" | |
- name: Install dependencies | |
run: | | |
python -m pip install "poetry==1.3.2" && poetry install && poetry run pre-commit install | |
- name: Run pre-commit checks | |
run: | | |
poetry run pre-commit run --all-files |