-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (59 loc) · 1.81 KB
/
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
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Push Events
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-please:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
steps:
- name: 🚀 Create Release
id: release-please
uses: agrc/release-composite-action@v1
with:
release-type: python
prerelease: ${{ github.ref_name == 'dev' }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
github-app-id: ${{ secrets.UGRC_RELEASE_BOT_APP_ID }}
github-app-key: ${{ secrets.UGRC_RELEASE_BOT_APP_KEY }}
github-app-name: ${{ secrets.UGRC_RELEASE_BOT_NAME }}
github-app-email: ${{ secrets.UGRC_RELEASE_BOT_EMAIL }}
upload-coverage:
name: Upload coverage
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release_created
steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false
- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: setup.py
- name: 📥 Install arcgis dependencies
run: |
sudo apt-get update
sudo apt-get install -y libkrb5-dev
- name: 🏗 Install module
run: pip install .[tests]
- name: ⚙️ Add config file
run: cp config.sample.json config.json
- name: 🧪 Run tests
run: pytest
- name: ⬆️ Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cov.xml