-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (67 loc) · 2.07 KB
/
Copy pathci.yml
File metadata and controls
80 lines (67 loc) · 2.07 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: chartboost/ruff-action@v1
with:
version: "0.15.7"
src: "HydroEO"
unit-tests:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install package with test extras
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Run unit tests (no network required)
run: pytest -m unit -v
# integration-tests:
# # Only run when the relevant secrets are available (not on forks)
# needs: unit-tests
# runs-on: ubuntu-latest
# if: |
# github.event_name == 'push' &&
# github.repository_owner == 'DHI'
# steps:
# - uses: actions/checkout@v6
# - name: Set up Python 3.12
# uses: actions/setup-python@v5
# with:
# python-version: "3.12"
# cache: "pip"
# - name: Install package with test extras
# run: |
# python -m pip install --upgrade pip
# pip install ".[test]"
# - name: Run live integration tests
# env:
# EDL_USERNAME: ${{ secrets.EDL_USERNAME }}
# EDL_PASSWORD: ${{ secrets.EDL_PASSWORD }}
# CREODIAS_USERNAME: ${{ secrets.CREODIAS_USERNAME }}
# CREODIAS_PASSWORD: ${{ secrets.CREODIAS_PASSWORD }}
# HYDROWEB_API_KEY: ${{ secrets.HYDROWEB_API_KEY }}
# RUN_E2E: ${{ secrets.RUN_E2E }}
# run: pytest -m integration -v --timeout=3600