-
Notifications
You must be signed in to change notification settings - Fork 19
49 lines (40 loc) · 1.24 KB
/
pip-checks.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
# This workflow checks that pip installation works to import the package (tests are in python-tests.yml)
name: pip-install
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: ${{ matrix.os }}, python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12"]
# Run all shells using bash (including Windows)
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
# We initiate the environment empty
- name: Initiate empty environment
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
auto-update-conda: true
use-mamba: true
channel-priority: strict
activate-environment: geoutils-pip
python-version: ${{ matrix.python-version }}
# Use pip install
- name: Install project
run: |
mamba install pip
pip install -e .
# Check import works
- name: Check import works with base environment
run: python -c "import geoutils"