-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (64 loc) · 1.87 KB
/
pydep.yml
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
name: pydep CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
defaults:
run:
# Ensures environment gets sourced right
shell: bash -e -l {0}
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
PYTHON_VERSION: ["3.9", "3.11", "3.12"]
env:
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Add /etc/hosts entries
run: |
cat .github/workflows/etchosts.txt | sudo tee -a /etc/hosts
# setup conda-forge with micromamba
- name: Setup Python
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
condarc: |
channels:
- conda-forge
- defaults
create-args: >-
python=${{ env.PYTHON_VERSION }}
environment-name: prod
cache-environment: true
- name: Install Python Dependencies via pip
run: python -m pip install -r pip_requirements.txt
- name: Setup paths
run: sh .github/setuppaths.sh
- name: Setup data
run: sh .github/setupdata.sh
- name: Setup Postgres
run: |
git clone --depth 1 https://github.com/akrherz/iem-database.git database
git clone --depth 1 https://github.com/akrherz/ci_tooling.git .ci_tooling
. .ci_tooling/postgres.sh
cd database; sh bootstrap.sh
python schema_manager.py
- name: Setup Memcached
run: |
. .ci_tooling/memcached.sh
- name: Build and test
run: |
python -m pip install . --upgrade --no-deps
python -m pytest --cov=pydep tests
python -m coverage xml
- name: Upload codecov
if: ${{ env.PYTHON_VERSION == '3.12' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml