Repository navigation
94 lines (86 loc) · 2.76 KB
/
Copy pathci.yaml
File metadata and controls
94 lines (86 loc) · 2.76 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
91
92
93
94
name: CI
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# LINT.IfChange(ruff)
- uses: astral-sh/ruff-action@v4.1.0
with:
version: 0.15.14
args: check --extend-exclude testdata
- uses: astral-sh/ruff-action@v4.1.0
with:
version: 0.15.14
args: format --check --exclude testdata
# LINT.ThenChange(//.pre-commit-config.yaml:ruff)
keep_sorted:
name: keep-sorted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Download keep-sorted
id: keep-sorted
uses: ./.github/actions/download-tool
with:
name: keep-sorted
# LINT.IfChange(keep_sorted)
urls: |
https://github.com/google/keep-sorted/releases/download/v0.10.0/keep-sorted_linux_amd64
sha256: 079710c01619cc3dc11c9ddce18ac8db8d86701e7d12f9c5b62b8c4c4a664cca
# LINT.ThenChange(//.pre-commit-config.yaml:keep_sorted)
- name: Check keep-sorted
env:
KEEP_SORTED_BIN: ${{ steps.keep-sorted.outputs.path }}
run: ./.github/workflows/check_keep_sorted.py -- "$KEEP_SORTED_BIN"
ifttt_lint:
name: ifttt-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Download ifttt-lint
id: ifttt-lint
uses: ./.github/actions/download-tool
with:
name: ifttt-lint
archive-member: ifttt-lint
# LINT.IfChange(ifttt_lint)
urls: |
https://github.com/simonepri/ifttt-lint/releases/download/v0.11.3/ifttt-lint-x86_64-unknown-linux-gnu.tar.gz
sha256: 1dd2071f17d5f5c11d698ae60e81c0ed1d419ca90a2d64f5d3810bdf28ddd4fe
# LINT.ThenChange(//.pre-commit-config.yaml:ifttt_lint)
- name: Check ifttt-lint
env:
IFTTT_LINT_BIN: ${{ steps.ifttt-lint.outputs.path }}
run: >-
"$IFTTT_LINT_BIN" --vcs git '**/*'
- name: Check ifttt-lint diff
if: github.event_name == 'pull_request'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
IFTTT_LINT_BIN: ${{ steps.ifttt-lint.outputs.path }}
run: >-
"$IFTTT_LINT_BIN" --vcs git --diff "${BASE_SHA}...${HEAD_SHA}"
build_release_artifacts:
name: Build release artifacts
uses: ./.github/workflows/release_build_artifacts.yaml
secrets: inherit