1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/.github/workflows/static-test.yml
2021-01-06 12:09:45 +01:00

44 lines
1.4 KiB
YAML

name: static-tests
on:
push:
branches:
- master
tags:
- '[0-9][0-9][0-9][0-9].[0-9][0-9]-RC[0-9]*'
- '[0-9][0-9][0-9][0-9].[0-9][0-9]'
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*'
pull_request:
branches:
- '*'
jobs:
static-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Use the SHA of the PR branch as-is, not the PR branch merged
# in master (default behavior in GH actions)
# See https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup git
run: |
# Note: ${{ github.base_ref }} is empty when not in a PR
if [ -n "${{ github.base_ref }}" ]; then
git fetch origin ${{ github.base_ref }}:${{ github.base_ref }} --no-tags
fi
git config apply.whitespace nowarn
- name: Fetch riot/riotbuild Docker image
run: docker pull riot/riotbuild:latest
- name: Run static-tests
run: |
# Note: ${{ github.base_ref }} is empty when not in a PR
docker run --rm \
-e CI_BASE_BRANCH=${{ github.base_ref }} \
-e GITHUB_RUN_ID=${GITHUB_RUN_ID} \
-v $(pwd):/data/riotbuild \
riot/riotbuild:latest \
make static-test