-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 1.81 KB
/
python-app.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Build
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "develop", "main" ]
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
# init
- uses: actions/checkout@v3
- name: Install dependencies
run: |
make init
# run pytest
- name: Test with pytest
run: |
make test
- name: upload code coverage
uses: actions/upload-artifact@v4
with:
name: code coverage
path: ./tests/lcov/html/*
if-no-files-found: error
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# publish pages
- name: Converts Markdown to HTML
uses: jaywcjlove/markdown-to-html-cli@main
with:
source: examples.md
output: examples.html
- name: Prepare examples
run: |
mkdir _site
cp -r docs _site
cp examples.md _site
cp examples.html _site
echo "<a href='examples.html'>examples</a>" > _site/index.html
- name: upload examples
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: _site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# publish wheel
- name: create wheel
run: |
env
make init pkg
chmod 777 dist/*
- name: upload wheel
uses: actions/upload-artifact@v4
with:
name: python wheel
path: dist
if-no-files-found: error