Skip to content

[ci] move CI to github, remove hardcoded flags #1

[ci] move CI to github, remove hardcoded flags

[ci] move CI to github, remove hardcoded flags #1

Workflow file for this run

name: style-checks
on: [pull_request]
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: retrieve merge target info
run: git fetch origin $GITHUB_BASE_REF
- run: sudo apt-get update
- run: sudo apt-get install -y clang-format-12
- name: run git-clang-format
run: |
target=$(git rev-parse origin/$GITHUB_BASE_REF)
git-clang-format-12 --quiet --diff $target > clang-format-diff
lint=$(grep -v --color=never "no modified files to format" clang-format-diff || true)
if [ ! -z "$lint" ]; then echo "format errors, inspect the clang-format-diff artifact for info"; exit 1; else exit 0; fi
shell: bash
- name: output clang format diff
if: always()
run: cat ./clang-format-diff
license-check:
runs-on: ubuntu-latest
container: apache/skywalking-eyes
steps:
- uses: actions/checkout@v2
- run: /bin/license-eye -c .licenserc.yml -v debug header check