1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-29 17:48:10 +00:00
trezor-firmware/.github/workflows/prebuild.yml

82 lines
2.6 KiB
YAML
Raw Normal View History

2021-04-30 10:17:58 +00:00
name: "Prebuild checks"
on:
pull_request:
workflow_dispatch:
schedule:
- cron: '13 23 * * *' # every day @ 23:13
2021-04-30 10:17:58 +00:00
jobs:
block-fixup:
name: Block fixup
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Block Fixup Commit Merge
uses: 13rac1/block-fixup-merge-action@v2.0.0
# Check the code for style correctness and perform some static code analysis.
# Biggest part is the python one - using `flake8`, `isort`, `black`, `pylint` and `pyright`,
# also checking Rust files by `rustfmt` and C files by `clang-format`.
# Changelogs formats are checked.
2021-04-30 10:17:58 +00:00
style_check:
name: Style check
2021-04-30 10:17:58 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/environment
- name: "Run style check"
run: nix-shell --run "poetry run make style_check"
- name: "Run .editorconfig check"
run: nix-shell --run "poetry run make editor_check"
2021-04-30 10:17:58 +00:00
# Check validity of coin definitions and protobuf files.
2021-04-30 10:17:58 +00:00
defs_check:
name: Defs check
2021-04-30 10:17:58 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2021-04-30 10:17:58 +00:00
with:
submodules: "recursive"
- uses: ./.github/actions/environment
- name: "Run defs check"
run: nix-shell --run "poetry run make defs_check"
2021-04-30 10:17:58 +00:00
# Check validity of auto-generated files.
2021-04-30 10:17:58 +00:00
gen_check:
name: Gen check
2021-04-30 10:17:58 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2021-04-30 10:17:58 +00:00
with:
submodules: "recursive"
- uses: ./.github/actions/environment
- name: "Run gen check"
run: nix-shell --run "poetry run make gen_check"
# Verifying that all commits changing some functionality have a changelog entry
# or contain `[no changelog]` in the commit message.
changelog_check:
name: Changelog check
if: ${{ github.ref != 'main' && github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
2023-11-30 23:05:32 +00:00
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: "Run changelog check"
run: ./ci/check_changelog.sh
# Checking the format of release commit messages.
release_commit_msg_check:
name: Release commit message check
if: ${{ startsWith(github.ref, 'refs/tags/release/') && github.repository == 'trezor/trezor-firmware' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/environment
- name: "Check release commit message format"
run: ./ci/check_release_commit_messages.sh