-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (88 loc) · 2.38 KB
/
checks.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Sanity Checks
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
tagging:
name: "Tagging (dry-run)"
needs: pre-commit
runs-on: ubuntu-latest
outputs:
net_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v3
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
- run: echo "Calculated Next Tag is ${{ steps.tag_version.outputs.tags }}"
#use this with ${{needs.job1.outputs.output1}}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: arduino/setup-task@v1
- name: Prepare dev env
run: task setup
- name: Lint and tests
run: |
source .venv/bin/activate
task test
build:
name: "Test build wheel"
runs-on: ubuntu-latest
needs:
- pre-commit
- tagging
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: arduino/setup-task@v1
- run: task setup
- run: |
source .venv/bin/activate
task build
# docker-build:
# name: "Test Build"
# runs-on: ubuntu-latest
# needs:
# - pre-commit
# - tagging
# env:
# IMAGE_NAME: jackbit/porcupine
# steps:
# - uses: actions/checkout@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v3
# with:
# images: ${{env.IMAGE_NAME}}
# flavor: |
# latest=auto
# prefix=
# suffix=
# tags: |
# type=raw,value=${{needs.tagging.outputs.next_tag}}
# - name: Build and push
# uses: docker/build-push-action@v2
# with:
# file: containers/Dockerfile
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta.outputs.tags }}