Skip to content

Add a Github workflow for creating an unstable release #2

Add a Github workflow for creating an unstable release

Add a Github workflow for creating an unstable release #2

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: start X server
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- uses: actions/checkout@v2
- run: npm ci
- run: npm test
- name: clang-format (diff)
if: github.event_name == 'pull_request'
env:
BASE: ${{ github['base_ref'] }}
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/$BASE:refs/remotes/origin/$BASE
npm run git-clang-format -- --diff origin/$BASE |\
awk -v s="^diff" '$0~s{r=1} 1; END{exit(r)}'
- name: clang-format (project)
if: github.event_name == 'push'
run: |
npm run git-clang-format -- --diff --commit $(git hash-object -t tree /dev/null) |\
awk -v s="^diff" '$0~s{r=1} 1; END{exit(r)}'