-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.37 KB
/
cicd.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
# -*- coding: utf-8 -*-
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# GitHub: https://github.com/btschwertfeger
#
# Workflow to apply pre-commit, build, test and upload the package
# to the test index of PyPI.
name: CI/CD
on:
push:
branches:
- "**"
concurrency:
group: CICD-${{ github.ref }}
cancel-in-progress: true
jobs:
## Checks the code logic, style and more
##
Pre-Commit:
uses: ./.github/workflows/_pre_commit.yaml
## Builds the package on multiple OS for multiple
## Python versions
##
Build:
needs: [Pre-Commit]
uses: ./.github/workflows/_build.yaml
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11"]
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
## Build the Docker image
##
Build-Docker:
if: success() && github.ref != 'refs/heads/master'
needs: [Pre-Commit]
uses: ./.github/workflows/_build_docker.yaml
with:
TAG: dev
## Run the unit and integration tests
##
Test:
needs: [Build]
uses: ./.github/workflows/_test.yaml
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"]
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}