-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (53 loc) · 1.25 KB
/
on-push.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
name: on-push
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
concurrency:
group: ${{ '{{ github.workflow }}' }}-${{ '{{ github.ref }}' }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/[email protected]
test-package:
runs-on: ubuntu-latest
needs: [pre-commit]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install cruft
run: pip3 install cruft
- name: Create my-package
run: cruft create . --output-dir .. -y
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ../my-package/ci/environment-ci.yml
environment-name: DEVELOP
cache-environment: true
create-args: >-
python=3.11
- name: Test my-package
run: |
cd ../my-package || exit
git init || exit
git add . || exit
pip install -e . || exit
make || exit
make docs-build || exit