misc: get rid of small _xc functions #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |