;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 \ |           && bin/commitlint  $RANGE \ | ||||||
|           || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) |           || ( 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: |     # things to be cached/restored: | ||||||
| 
 | 
 | ||||||
|     - name: Cache stack global package db |     - name: Cache stack global package db | ||||||
| @ -90,6 +95,7 @@ jobs: | |||||||
|         key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }} |         key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }} | ||||||
|         restore-keys: | |         restore-keys: | | ||||||
|              ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }} |              ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }} | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Cache stack-installed programs in ~/.local/bin |     - name: Cache stack-installed programs in ~/.local/bin | ||||||
|       id:   stack-programs |       id:   stack-programs | ||||||
| @ -99,6 +105,7 @@ jobs: | |||||||
|         key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }} |         key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }} | ||||||
|         restore-keys: | |         restore-keys: | | ||||||
|              ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }} |              ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }} | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Cache .stack-work |     - name: Cache .stack-work | ||||||
|       uses: actions/cache@v2 |       uses: actions/cache@v2 | ||||||
| @ -107,6 +114,7 @@ jobs: | |||||||
|         key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }} |         key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }} | ||||||
|         restore-keys: | |         restore-keys: | | ||||||
|              ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }} |              ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }} | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger-lib/.stack-work |     - name: Cache hledger-lib/.stack-work | ||||||
|       uses: actions/cache@v2 |       uses: actions/cache@v2 | ||||||
| @ -115,6 +123,7 @@ jobs: | |||||||
|         key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-lib/package.yaml') }} |         key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-lib/package.yaml') }} | ||||||
|         restore-keys: | |         restore-keys: | | ||||||
|              ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }} |              ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }} | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger/.stack-work |     - name: Cache hledger/.stack-work | ||||||
|       uses: actions/cache@v2 |       uses: actions/cache@v2 | ||||||
| @ -123,6 +132,7 @@ jobs: | |||||||
|         key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger/package.yaml') }} |         key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger/package.yaml') }} | ||||||
|         restore-keys: | |         restore-keys: | | ||||||
|              ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }} |              ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }} | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger-ui/.stack-work |     - name: Cache hledger-ui/.stack-work | ||||||
|       uses: actions/cache@v2 |       uses: actions/cache@v2 | ||||||
| @ -131,6 +141,7 @@ jobs: | |||||||
|         key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-ui/package.yaml') }} |         key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-ui/package.yaml') }} | ||||||
|         restore-keys: | |         restore-keys: | | ||||||
|              ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }} |              ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }} | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Cache hledger-web/.stack-work |     - name: Cache hledger-web/.stack-work | ||||||
|       uses: actions/cache@v2 |       uses: actions/cache@v2 | ||||||
| @ -139,6 +150,7 @@ jobs: | |||||||
|         key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-web/package.yaml') }} |         key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-web/package.yaml') }} | ||||||
|         restore-keys: | |         restore-keys: | | ||||||
|              ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }} |              ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }} | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     # actions: |     # 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 |         # 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 |         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 |         stack --version | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Install GHC |     - name: Install GHC | ||||||
|       env: |       env: | ||||||
|         stack: ${{ matrix.plan.stack }} |         stack: ${{ matrix.plan.stack }} | ||||||
|       run: | |       run: | | ||||||
|         $stack setup --install-ghc |         $stack setup --install-ghc | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Install haskell deps |     - name: Install haskell deps | ||||||
|       env: |       env: | ||||||
|         stack: ${{ matrix.plan.stack }} |         stack: ${{ matrix.plan.stack }} | ||||||
|       run: | |       run: | | ||||||
|         $stack build --only-dependencies |         $stack build --only-dependencies | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Build hledger fast |     - name: Build hledger fast | ||||||
|       env: |       env: | ||||||
| @ -169,6 +184,7 @@ jobs: | |||||||
|         $stack build --fast --ghc-options=-Werror --force-dirty |         $stack build --fast --ghc-options=-Werror --force-dirty | ||||||
|         # --ghc-options=-fforce-recomp   # needed occasionally to clear out stale compiled modules |         # --ghc-options=-fforce-recomp   # needed occasionally to clear out stale compiled modules | ||||||
|         #  --pedantic |         #  --pedantic | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Install shelltestrunner |     - name: Install shelltestrunner | ||||||
|       env: |       env: | ||||||
| @ -177,6 +193,7 @@ jobs: | |||||||
|         export PATH=~/.local/bin:$PATH |         export PATH=~/.local/bin:$PATH | ||||||
|         if [[ ! -x ~/.local/bin/shelltest ]]; then $stack install shelltestrunner-1.9; fi |         if [[ ! -x ~/.local/bin/shelltest ]]; then $stack install shelltestrunner-1.9; fi | ||||||
|         shelltest --version |         shelltest --version | ||||||
|  |       if: env.CONTINUE | ||||||
| 
 | 
 | ||||||
|     - name: Test functional tests (excluding addons) |     - name: Test functional tests (excluding addons) | ||||||
|       env: |       env: | ||||||
| @ -185,3 +202,4 @@ jobs: | |||||||
|         export PATH=~/.local/bin:$PATH |         export PATH=~/.local/bin:$PATH | ||||||
|         COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons  #  bin |         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 |         # 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