Skip to content

Merge branch 'main' of https://github.com/UW-Macrostrat/macrostrat #31

Merge branch 'main' of https://github.com/UW-Macrostrat/macrostrat

Merge branch 'main' of https://github.com/UW-Macrostrat/macrostrat #31

Workflow file for this run

name: Format code and sort imports
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/[email protected]
with:
python-version: '^3.11'
- uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
~/.virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: poetry install --only dev
- name: Run formatting commands
run: make format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Format code and sort imports
branch: ${{ github.head_ref }}