test workflow #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:sw=2:ts=2 | |
name: test | |
on: | |
workflow_call: ##### externally callable from other workflow | |
workflow_dispatch: ##### callable by hand from GH web | |
push: | |
branches: | |
- master | |
- 'feature/*' | |
- 'nalajcie/ci' #### my devel branch here - triggering new version of workflow by amending commit + git push -f | |
pull_request: | |
branches: | |
- master | |
- 'feature/*' | |
- 'nalajcie/ci' | |
### additional triggers like schedule can be done here (to trigger the job periodically | |
jobs: | |
### we can run multiple jobs at the same time by using "artificial" strategy.matrix | |
# single job | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'random to file' | |
run: echo "$((RANDOM % 10))" > random_value | |
- name: 'show random' | |
run: cat random_value | |
# fail 10% of time | |
- name: "test random" | |
run: '[ ! "$(cat random_value)" -eq 0 ]' | |
# debug if failed | |
- name: Debug failures by SSH | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |