-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (76 loc) · 2.35 KB
/
default.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
93
94
95
96
name: Default
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
concurrency: lint
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Force correct branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Install Poetry
run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.12.6
cache: poetry
- name: Install Dependencies
run: poetry install --no-root --with dev --sync
- name: Lint Code
run: |
poetry run codespell `git ls-files "*.yaml" "*.yml" "*.md" "*.sh"`
poetry run yamllint --strict `git ls-files "*.yaml" "*.yml"`
poetry run mdformat --wrap 79 --number --check `git ls-files "*.md"`
poetry run shellcheck `git ls-files "*.sh"`
test:
runs-on: ubuntu-latest
needs: [ lint ]
concurrency: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Install Poetry
run: pipx install poetry
- name: Force correct branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.12.6
cache: poetry
- name: Install Dependencies
run: |
./bashdep.sh
poetry install --no-root --with dev --sync
- name: Run Tests
run: ./lib/bashunit --parallel `git ls-files "tests/*.sh"`
release:
runs-on: ubuntu-latest
needs: [ test ]
concurrency: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}
- name: Force correct branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Semantic Version Tagging
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "OpenFisca Bot"
git_committer_email: "bot+${{ github.sha }}@openfisca.org"