-
Notifications
You must be signed in to change notification settings - Fork 6
120 lines (116 loc) · 3.66 KB
/
install-example-projects.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
115
116
117
118
119
120
name: install-example-projects
on:
push:
branches: [main]
pull_request:
jobs:
pip-install:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # skips 3.7 (unsupported on GH Actions)
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
PYTHONIOENCODING: "utf8" # https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Update pyproject.toml
run: |
python .github/use-local-unidep.py
- name: Install example packages
run: |
set -ex
# Loop over all folders in `./example` and install them
for d in ./example/*/ ; do
pip install -e "$d"
pkg=$(basename $d)
python -c "import $pkg"
pip list
done
shell: bash
micromamba-install:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # skips 3.7 (unsupported on GH Actions)
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
PYTHONIOENCODING: "utf8" # https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v2
with:
environment-name: unidep
create-args: >-
python=${{ matrix.python-version }}
- name: Install unidep
run: |
python -m pip install --upgrade pip
pip install -e ".[toml]"
shell: bash -el {0}
- name: Update pyproject.toml
run: |
python .github/use-local-unidep.py
shell: bash -el {0}
- name: Install example packages
run: |
set -ex
# Loop over all folders in `./example` and install them
for d in ./example/*/ ; do
unidep install -e "$d"
pkg=$(basename $d)
python -c "import $pkg"
micromamba list
done
shell: bash -el {0}
miniconda-install:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.12"] # Just testing the oldest and newest supported versions
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
PYTHONIOENCODING: "utf8" # https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -el {0}
run: conda info
- name: Install unidep
run: |
python -m pip install --upgrade pip
pip install -e ".[toml]"
shell: bash -el {0}
- name: Update pyproject.toml
run: |
python .github/use-local-unidep.py
shell: bash -el {0}
- name: Install example packages
run: |
set -ex
# Loop over all folders in `./example` and install them
for d in ./example/*/ ; do
unidep install -e "$d"
pkg=$(basename $d)
python -c "import $pkg"
conda list
done
shell: bash -el {0}