Skip to content

Bump actions/checkout from 3 to 4 #97

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #97

---
name: Functional Tests
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
pull_request:
jobs:
functional_tests:
name: Run script
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "windows", "macos"]
version: ["0.1.dev0", "0.1.dev1"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
version: ${{ matrix.version }}
- name: Validate command (Linux, macOS)
if: ${{ runner.os != 'Windows' }}
run: |
touch ./hello-world.bf
echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.++" > ./hello-world.bf
echo "+.------.--------.>>+.>++." >> ./hello-world.bf
output=$(brainfucky --file ./hello-world.bf)
rm ./hello-world.bf
[[ "${output:32:12}" == "Hello World!" ]] || exit 1;
shell: bash
- name: Validate command (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
New-Item -Path . -Name "hello-world.bf" -ItemType "file" -Value "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.++`n+.------.--------.>>+.>++."
$Output = (brainfucky --file ./hello-world.bf) | Out-String
Remove-Item hello-world.bf
&{If($Output.Substring(33, 12) -ne 'Hello World!') {exit 1}}
shell: pwsh