Add Luxon, refactor date parsing/formatting #50
Workflow file for this run
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 | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
name: "pre-commit" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/[email protected] | |
- name: Parse Python version from runtime.txt | |
run: | | |
sed 's/[^0-9.]//g' runtime.txt | head > .python-version | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install dependencies with Poetry | |
run: | | |
poetry install --no-root --with=dev --no-interaction --no-ansi | |
# add virtual environment to path for future steps | |
echo $(poetry env info --path)/bin >> $GITHUB_PATH | |
- name: Run pre-commit hooks | |
uses: pre-commit/[email protected] | |
with: | |
# only check changed files | |
extra_args: "--files ${{ steps.changed-files.outputs.all_changed_files }}" |