-
Notifications
You must be signed in to change notification settings - Fork 57
51 lines (47 loc) · 1.16 KB
/
ci.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
---
name: CI
on:
push:
# Trigger a build on tags, on push against main and release branches and ci/ to test
tags:
- "*"
branches:
- main
- release/*
pull_request:
# Trigger a build on PR against main, feature branches and release branches
branches:
- main
- feature/*
- release/*
# Manual trigger, allows reusage from other workflows (like release)
workflow_dispatch:
env:
PIPENV_NOSPIN: 1
jobs:
# Compute metadata once to ensure every following job is using the same
# and avoid logic and step repetition
lint:
name: Static analysis
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pipenv'
-
name: Install pipenv
run: pip install -U pip pipenv wheel
-
name: Install python dependencies
env:
PYPI_DEPLOY_TOKEN: ${{ secrets.PYPI_DEPLOY_TOKEN }}
run: pipenv sync --dev
-
name: Validate files and format
run: pipenv run validate_files