Skip to content

Add "Security" workflow (#136) #29

Add "Security" workflow (#136)

Add "Security" workflow (#136) #29

---
name: Functional Tests (Remote)
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
defaults:
run:
shell: sh
jobs:
run-script:
name: Run script
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
version: ["3.1.2", "3.0-rc1", "3.1-rc1", "3.1.1"]
runs-on: ubuntu-latest
steps:
- name: Setup COBOL
uses: fabasoad/setup-cobol-action@main
with:
version: ${{ matrix.version }}
- name: Prepare script
run: |
echo 'HELLO * HISTORIC EXAMPLE OF HELLO WORLD IN COBOL' > HelloWorld.cob
echo ' IDENTIFICATION DIVISION.' >> HelloWorld.cob
echo ' PROGRAM-ID. HELLO.' >> HelloWorld.cob
echo ' PROCEDURE DIVISION.' >> HelloWorld.cob
echo ' DISPLAY "Hello World!".' >> HelloWorld.cob
echo ' STOP RUN.' >> HelloWorld.cob
- name: Print file
run: cat ./HelloWorld.cob
- name: Validate script
run: |
cobc -x ./HelloWorld.cob
[ "$(./HelloWorld)" = "Hello World!" ] || exit 1;