Skip to content

Commit

Permalink
Initial commit for GHActions
Browse files Browse the repository at this point in the history
  • Loading branch information
Svenito committed Oct 18, 2024
1 parent 80b6065 commit 6a01fd4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: tests

"on":
push:
branches:
- github-actions
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * *"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-rye@v4
id: setup-rye
with:
enable-cache: true
cache-prefix: ${{ matrix.python-version }}
- name: Pin python-version ${{ matrix.python-version }}
run: rye pin ${{ matrix.python-version }}
- name: Install dependencies
if: steps.setup-rye.outputs.cache-hit != 'true'
run: |
rye sync --no-lock
- name: Cache pre-commit
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/pre-commit
key: pre-commit-|${{ matrix.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Lint
run: |
rye run pre-commit run --all-files
- name: Lint GitHub Actions
uses: eifinger/actionlint-action@v1

0 comments on commit 6a01fd4

Please sign in to comment.