forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (101 loc) · 3.94 KB
/
lint.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: lint
on:
push:
branches:
- 'master'
- 'release/**'
tags:
- '**'
pull_request:
workflow_dispatch:
concurrency:
# Update of a developer branch cancels the previously scheduled workflow
# run for this branch. However, the 'master' branch, release branch, and
# tag workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow run ID' +
# 'workflow run attempt' because it is a unique combination for any run.
# So it effectively discards grouping.
#
# Important: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push event.
group: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/')) &&
format('{0}-{1}', github.run_id, github.run_attempt) ||
format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true
jobs:
luacheck:
# Run on push to the 'master' and release branches of tarantool/tarantool
# or on pull request if the 'notest' label is not set.
if: github.repository == 'tarantool/tarantool' &&
( github.event_name != 'pull_request' ||
( github.event_name == 'pull_request' &&
!contains(github.event.pull_request.labels.*.name, 'notest') ) )
runs-on: ubuntu-20.04-self-hosted
steps:
- name: Prepare checkout
uses: tarantool/actions/prepare-checkout@master
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Install deps
uses: ./.github/actions/install-deps-debian
- name: test
run: make -f .test.mk luacheck
- name: Send VK Teams message on failure
if: failure()
uses: ./.github/actions/report-job-status
with:
bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}
release-notes:
# Run on push to the 'master' and release branches of tarantool/tarantool
# or on pull request if the 'notest' label is not set.
if: github.repository == 'tarantool/tarantool' &&
( github.event_name != 'pull_request' ||
( github.event_name == 'pull_request' &&
!contains(github.event.pull_request.labels.*.name, 'notest') ) )
runs-on: ubuntu-20.04-self-hosted
steps:
- name: Prepare checkout
uses: tarantool/actions/prepare-checkout@master
# We don't need neither deep fetch, nor submodules here.
- uses: actions/checkout@v3
# Don't use actions/setup-python to don't bother with proper
# setup of our self-hosted machines, see [1].
#
# Any python version is okay for the script, even Python 2.
#
# [1]: https://github.com/actions/setup-python#using-setup-python-with-a-self-hosted-runner
- run: ./tools/gen-release-notes
- name: Send VK Teams message on failure
if: failure()
uses: ./.github/actions/report-job-status
with:
bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}
checkpatch:
# Run only if the workflow was triggered by a pull request for
# tarantool/tarantool that doesn't have the 'notest' label.
if: github.repository == 'tarantool/tarantool' &&
( github.event_name == 'pull_request' &&
!contains(github.event.pull_request.labels.*.name, 'notest') )
runs-on: ubuntu-20.04-self-hosted
steps:
- name: Prepare checkout
uses: tarantool/actions/prepare-checkout@master
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: test
uses: tarantool/checkpatch/.github/actions/checkpatch@master
with:
revision-range: HEAD~${{ github.event.pull_request.commits }}..HEAD
- name: Send VK Teams message on failure
if: failure()
uses: ./.github/actions/report-job-status
with:
bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}