forked from mheberger/upstream-delineator
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (34 loc) · 927 Bytes
/
ci.yml
File metadata and controls
43 lines (34 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install mise
uses: jdx/mise-action@v2
- name: Install Python dependencies
run: uv sync
- name: Run ruff linter
run: uv run ruff check
- name: Run ruff formatter check
run: uv run ruff format --check
- name: Restore test hydrology data cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: .test_cache
key: test-hydrology-data-v2
- name: Run tests
run: uv run pytest -n auto
- name: Save test hydrology data cache
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: .test_cache
key: test-hydrology-data-v2