-
Notifications
You must be signed in to change notification settings - Fork 16
41 lines (38 loc) · 1.03 KB
/
build.yml
File metadata and controls
41 lines (38 loc) · 1.03 KB
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
name: Test package build
env:
PACKAGE_NAME: ${{ github.event.repository.name }}
on:
pull_request:
branches:
- main
push:
workflow_dispatch:
# We use a matrix to run the same job on multiple operating systems and Python versions.
jobs:
test-os:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} with minconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
- name: Print Python Version
run: |
python -V
- name: Install ${{ env.PACKAGE_NAME }}
run: |
pip install .
- name: Test ${{ env.PACKAGE_NAME }} install
run: |
python -c "import ${PACKAGE_NAME}"