-
-
Notifications
You must be signed in to change notification settings - Fork 35
114 lines (101 loc) · 3.9 KB
/
tests.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: tests
on:
push: null
workflow_dispatch: null
env:
PY_COLORS: 1
jobs:
tests:
name: tests
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.10'
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true
miniforge-version: latest
- name: generate token
id: generate_token
uses: conda-forge/github-app-token@e3ab451d57e120b956292a1fa1d21fe4ba171c36
with:
app_id: ${{ secrets.CF_CURATOR_APP_ID }}
private_key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
- name: configure conda
shell: bash -l {0}
run: |
conda config --set show_channel_urls True
conda config --add channels conda-forge
conda install --yes --quiet --file conda-requirements.txt
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
mkdir -p ~/.conda-smithy/ && echo $GH_TOKEN > ~/.conda-smithy/github.token
pip install --no-deps -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: lint
shell: bash -l {0}
run: |
# maybe later...
# black --check conda_forge_webservices
flake8 conda_forge_webservices
- name: run test suite
shell: bash -l {0}
run: |
export CF_WEBSERVICES_TEST=1
pytest -vvx conda_forge_webservices
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
PROD_BINSTAR_TOKEN: ${{ secrets.PROD_BINSTAR_TOKEN }}
STAGING_BINSTAR_TOKEN: ${{ secrets.HEROKU_ONLY_STAGING_BINSTAR_TOKEN }}
CF_WEBSERVICES_TOKEN: ${{ secrets.CF_WEBSERVICES_TOKEN }}
CF_WEBSERVICES_APP_ID: ${{ secrets.CF_CURATOR_APP_ID }}
CF_WEBSERVICES_PRIVATE_KEY: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
live-tests:
name: live-tests
runs-on: "ubuntu-latest"
needs: tests
concurrency:
group: live-tests
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.8
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true
miniforge-version: latest
- name: generate token
id: generate_token
uses: conda-forge/github-app-token@e3ab451d57e120b956292a1fa1d21fe4ba171c36
with:
app_id: ${{ secrets.CF_CURATOR_APP_ID }}
private_key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
- name: configure conda
shell: bash -l {0}
run: |
conda config --set show_channel_urls True
conda config --add channels conda-forge
conda install --yes --quiet --file conda-requirements.txt
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
mkdir -p ~/.conda-smithy/ && echo $GH_TOKEN > ~/.conda-smithy/github.token
pip install --no-deps -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run package upload tests
shell: bash -l {0}
run: |
export CF_WEBSERVICES_TEST=1
./scripts/run_cfep13_tests.sh
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
PROD_BINSTAR_TOKEN: ${{ secrets.PROD_BINSTAR_TOKEN }}
STAGING_BINSTAR_TOKEN: ${{ secrets.HEROKU_ONLY_STAGING_BINSTAR_TOKEN }}
CF_WEBSERVICES_TOKEN: ${{ secrets.CF_WEBSERVICES_TOKEN }}
CF_WEBSERVICES_APP_ID: ${{ secrets.CF_CURATOR_APP_ID }}
CF_WEBSERVICES_PRIVATE_KEY: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}