Update trunk-check.yml #11
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: Trunk Check | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [main, develop] | |
jobs: | |
trunk-check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Cache Trunk | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/trunk | |
key: trunk-${{ runner.os }}-${{ hashFiles('.trunk/trunk.yaml') }} | |
restore-keys: | | |
trunk-${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
- name: Trunk Check | |
uses: trunk-io/trunk-action@v1 | |
with: | |
check-mode: all | |
arguments: check --no-progress | |
- name: Run pre-commit checks | |
run: | | |
pre-commit run --all-files | |
- name: Run linters | |
run: | | |
make lint |