-
-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (60 loc) · 1.6 KB
/
main.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
working-directory: ./web
- run: npm run build --if-present
working-directory: ./web
test:
name: test-py${{ matrix.python }}-${{matrix.CARBONPLAN_DATA}}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python: ['3.9', '3.10', '3.11']
CARBONPLAN_DATA: [
# 'https://carbonplan.blob.core.windows.net/carbonplan-data',
'gs://carbonplan-data',
]
steps:
- uses: actions/checkout@v4
- name: Install Conda environment from environment.yml
uses: mamba-org/setup-micromamba@v1
with:
# environment-file is not assumed anymore
environment-file: ci/environment.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install -e .
- name: Conda list information
run: |
conda env list
conda list
- name: Run tests
env:
CARBONPLAN_DATA: ${{ matrix.CARBONPLAN_DATA }}
run: |
python -m pytest