-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (75 loc) · 2.66 KB
/
ci.yml
File metadata and controls
90 lines (75 loc) · 2.66 KB
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
name: CI
run-name: CI - ${{ github.event_name == 'pull_request' && github.event.pull_request.title || github.event_name == 'push' && github.event.head_commit.message || github.ref_name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version != '' && format('(v{0})', github.event.inputs.version) || '' }}
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
inputs:
version:
description: "Release version"
default: "None"
required: false
env:
CI: "true"
jobs:
# Continuous Integration (CI) pipeline
ci:
if: ${{ vars.CONTINUOUS_INTEGRATION == 'true' }}
permissions:
contents: read
env:
PIPELINE_TESTS: ${{ github.event_name != 'workflow_dispatch' && github.event.inputs.version == '' && startsWith(github.ref, 'refs/tags/') == false && github.ref != 'refs/heads/main' && 'true' || 'false' }}
RELEASE_MODE: "false"
VERSION: ${{ github.run_id }}
timeout-minutes: 15
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
platforms: [linux/amd64, linux/arm64]
steps:
- name: Checkout Git repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
- name: Install dependencies
shell: bash
run: uvx uvtask dev-install
- name: security-analysis-licenses
shell: bash
run: uvx uvtask security-analysis:licenses
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: security-analysis-vulnerabilities
shell: bash
run: uvx uvtask security-analysis:vulnerabilities
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: static-analysis-linter
shell: bash
run: uvx uvtask static-analysis:linter
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: static-analysis-types
shell: bash
run: uvx uvtask static-analysis:types
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: complexity-visibility
shell: bash
run: uvx uvtask complexity:visibility
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: complexity-enforcement
shell: bash
run: uvx uvtask complexity:enforcement
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: unit-tests
shell: bash
run: uvx uvtask unit-tests
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: integration-tests
shell: bash
run: uvx uvtask integration-tests
if: ${{ env.PIPELINE_TESTS == 'true' }}
- name: Clean
shell: bash
run: uvx uvtask clean