-
Notifications
You must be signed in to change notification settings - Fork 16
76 lines (62 loc) · 1.87 KB
/
dev.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
name: dev workflow
on:
push:
branches: [main, develop]
jobs:
test:
strategy:
matrix:
python-versions: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]
include:
- miniforge-variant: Mambaforge
miniforge-version: 4.11.0-4
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: setup conda environment with mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
use-mamba: true
python-version: ${{ matrix.python-version }}
miniforge-variant: ${{ matrix.miniforge-variant }}
miniforge-version: ${{ matrix.miniforge-version }}
- name: install dependencies
run: pip install tox tox-gh-actions
- name: test with tox
run: tox
env:
CONDA_EXE: mamba
- name: upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: list files
run: ls -l .
publish_dev_build:
needs: test
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/pylandstats
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: list files
run: ls -l .
- name: build wheels and source tarball
run: |
python -m build
twine check --strict dist/*
- name: publish to test pypi
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' # This step will only run on pushes
with:
repository_url: https://test.pypi.org/legacy/