mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
;ci: push: skip most steps if commit message begins with ;
This commit is contained in:
parent
9a18eed9dd
commit
2c7e3136e0
18
.github/workflows/push.yml
vendored
18
.github/workflows/push.yml
vendored
@ -80,6 +80,11 @@ jobs:
|
||||
&& bin/commitlint $RANGE \
|
||||
|| ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM )
|
||||
|
||||
- name: Skip remaining CI steps if last commit message begins with ; ?
|
||||
run: |
|
||||
git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} \
|
||||
| grep -qE '^ *;' || echo “::set-env name=CONTINUE::true”
|
||||
|
||||
# things to be cached/restored:
|
||||
|
||||
- name: Cache stack global package db
|
||||
@ -90,6 +95,7 @@ jobs:
|
||||
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Cache stack-installed programs in ~/.local/bin
|
||||
id: stack-programs
|
||||
@ -99,6 +105,7 @@ jobs:
|
||||
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Cache .stack-work
|
||||
uses: actions/cache@v2
|
||||
@ -107,6 +114,7 @@ jobs:
|
||||
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Cache hledger-lib/.stack-work
|
||||
uses: actions/cache@v2
|
||||
@ -115,6 +123,7 @@ jobs:
|
||||
key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Cache hledger/.stack-work
|
||||
uses: actions/cache@v2
|
||||
@ -123,6 +132,7 @@ jobs:
|
||||
key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Cache hledger-ui/.stack-work
|
||||
uses: actions/cache@v2
|
||||
@ -131,6 +141,7 @@ jobs:
|
||||
key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Cache hledger-web/.stack-work
|
||||
uses: actions/cache@v2
|
||||
@ -139,6 +150,7 @@ jobs:
|
||||
key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-web/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}
|
||||
if: env.CONTINUE
|
||||
|
||||
# actions:
|
||||
|
||||
@ -149,18 +161,21 @@ jobs:
|
||||
# curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
|
||||
if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
|
||||
stack --version
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Install GHC
|
||||
env:
|
||||
stack: ${{ matrix.plan.stack }}
|
||||
run: |
|
||||
$stack setup --install-ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Install haskell deps
|
||||
env:
|
||||
stack: ${{ matrix.plan.stack }}
|
||||
run: |
|
||||
$stack build --only-dependencies
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Build hledger fast
|
||||
env:
|
||||
@ -169,6 +184,7 @@ jobs:
|
||||
$stack build --fast --ghc-options=-Werror --force-dirty
|
||||
# --ghc-options=-fforce-recomp # needed occasionally to clear out stale compiled modules
|
||||
# --pedantic
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Install shelltestrunner
|
||||
env:
|
||||
@ -177,6 +193,7 @@ jobs:
|
||||
export PATH=~/.local/bin:$PATH
|
||||
if [[ ! -x ~/.local/bin/shelltest ]]; then $stack install shelltestrunner-1.9; fi
|
||||
shelltest --version
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Test functional tests (excluding addons)
|
||||
env:
|
||||
@ -185,3 +202,4 @@ jobs:
|
||||
export PATH=~/.local/bin:$PATH
|
||||
COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons # bin
|
||||
# XXX func tests in bin are run only with GHC 8.2 for now
|
||||
if: env.CONTINUE
|
||||
|
Loading…
Reference in New Issue
Block a user