Files
seL4/.github/workflows/git.yaml
Gerwin Klein 3f9a4cd809 github: add workflow actions for style checks
This replicates some of the TS-internal CI checks directly on github
for faster feedback.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-05-05 11:22:09 +10:00

36 lines
966 B
YAML

# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
#
# SPDX-License-Identifier: BSD-2-Clause
name: Git
on: [pull_request]
jobs:
gitlint:
name: Gitlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- run: |
git fetch --depth 1 --no-tags origin +refs/heads/${{ github.base_ref }}:refs/heads/${{ github.base_ref }}
- uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Install gitlint
run: pip install gitlint
- name: Run gitlint
run: gitlint --commits ${{ github.base_ref }}..${{ github.event.pull_request.head.sha }} lint
whitespace:
name: Trailing Whitespace
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git fetch --depth 1 --no-tags origin +refs/heads/${{ github.base_ref }}:refs/heads/${{ github.base_ref }}
- name: Check
run: git diff --check ${{ github.base_ref }}