build: check compilation of each commit

Inspired by Rust Lightning's GH action :)
This commit is contained in:
Conner Fromknecht committed 2020-12-08 16:19:26 -08:00
1 parent 592a0c5699
commit dce4d2abcd
3 files changed
+35 -5

No files matched your search

+15 -5
View File
@@ -63,14 +63,16 @@ jobs:
run: make rpc-check
########################
# compile unit tests
# check commits
########################
unit-compile:
name: compile unit tests
check-commits:
name: check commits
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: go cache
uses: actions/cache@v1
@@ -88,8 +90,16 @@ jobs:
with:
go-version: '~${{ env.GO_VERSION }}'
- name: compile
run: make unit pkg=... case=_NONE_
- name: fetch and rebase on master
run: |
git remote add upstream https://github.com/lightningnetwork/lnd
git fetch upstream
export GIT_COMMITTER_EMAIL="lnd-ci@example.com"
export GIT_COMMITTER_NAME="LND CI"
git rebase upstream/master
- name: check commits
run: scripts/check-each-commit.sh upstream/master
########################
# lint code