generated from cicirello/python-github-action-template
-
-
Notifications
You must be signed in to change notification settings - Fork 35
58 lines (46 loc) · 1.33 KB
/
build.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: build
on:
push:
branches: [ main ]
paths-ignore: [ '**.svg', '**.md' ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run Python unit tests
run: |
python3 -u -m unittest tests/tests.py
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Verify that the Docker image for the action builds
run: docker build . --file Dockerfile
- name: Integration test
id: integration
uses: ./
with:
colors: dark
commit-and-push: false
featured-repository: Chips-n-Salsa
animated-language-chart: true
locale: en
#fail-on-error: false
#category-order: general, repositories, languages, contributions
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Output the outputs of the integration test of the action
run: |
echo "exit-code = ${{ steps.integration.outputs.exit-code }}"
- name: Upload generated SVG as a workflow artifact for inspection if necessary
uses: actions/upload-artifact@v4
with:
name: generated-image
path: images/userstats.svg