Skip to content

Commit 28e4c2a

Browse files
committed
Update actions
1 parent 794a7dd commit 28e4c2a

File tree

4 files changed

+57
-10
lines changed

4 files changed

+57
-10
lines changed
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
name: Create and publish a Docker image
22

33
on:
4-
push:
5-
tags:
4+
workflow_call:
65

76
env:
87
REGISTRY: ghcr.io
98
IMAGE_NAME: ${{ github.repository }}
109

1110
jobs:
12-
testing:
13-
name: Integration tests and linting
14-
uses: ./.github/workflows/integration.yml
1511
build-and-push-image:
1612
name: Build and push image
1713
needs: testing
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Integration Tests
22

33
on:
44
workflow_call:
5-
push:
6-
branches:
7-
- "*"
8-
tags-ignore:
9-
- "*"
105

116
jobs:
127
test:
@@ -37,3 +32,10 @@ jobs:
3732
CONFIG_PATH: /home/runner/work/pato-backend/pato-backend/config.json
3833
run: |
3934
tox -e pytest
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v5
37+
with:
38+
name: ${{ inputs.python-version }}/${{ inputs.runs-on }}
39+
files: cov.xml
40+
env:
41+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/_tox.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
tox:
5+
type: string
6+
description: What to run under tox
7+
required: true
8+
9+
jobs:
10+
run:
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install python packages
18+
uses: ./.github/actions/install_requirements
19+
20+
- name: Run tox
21+
run: tox -e ${{ inputs.tox }}

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
check:
9+
uses: ./.github/workflows/_check.yml
10+
11+
lint:
12+
needs: check
13+
if: needs.check.outputs.branch-pr == ''
14+
uses: ./.github/workflows/_tox.yml
15+
with:
16+
tox: pre-commit
17+
18+
test:
19+
needs: check
20+
if: needs.check.outputs.branch-pr == ''
21+
uses: ./.github/workflows/_integration.yml
22+
23+
release:
24+
if: github.ref_type == 'tag'
25+
needs: docs
26+
uses: ./.github/workflows/_dist.yml
27+
permissions:
28+
contents: write

0 commit comments

Comments
 (0)