Skip to content

feat: support windows and macos #72

feat: support windows and macos

feat: support windows and macos #72

name: "Test local action inside $HOME"
on:
workflow_dispatch:
pull_request:
release:
types: [published]
push:
branches: ["main"]
tags: ["*"]
jobs:
local_test_home:
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
runs-on: ubuntu-latest
env:
BATS_LIB_PATH: "${{ github.workspace }}/tests"
TERM: xterm
name: local default
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: bats-action
uses: ./
with:
bats-version: ${{ matrix.version }}
support-clean: "false"
support-path: "${{ github.workspace }}/tests/bats-support"
assert-clean: "false"
assert-path: "${{ github.workspace }}/tests/bats-assert"
detik-clean: "false"
detik-path: "${{ github.workspace }}/tests/bats-detik"
file-clean: "false"
file-path: "${{ github.workspace }}/tests/bats-file"
- name: Execute test to check Bats-support
if: steps.bats-action.outputs.support-installed == 'true'
run: |
cd /tmp/bats-support/
bats test
- name: Execute test to check Bats-assert
if: steps.bats-action.outputs.assert-installed == 'true'
run: |
ls -l $BATS_LIB_PATH/
cd /tmp/bats-assert/
bats test
- name: Execute test to check Bats-detik
if: steps.bats-action.outputs.detik-installed == 'true'
run: |
cd /tmp/bats-detik/
bats tests
- name: Execute test to check Bats-file
if: steps.bats-action.outputs.file-installed == 'true'
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
run: |
cd /tmp/bats-file/
bats test
- name: Execute example tests
run: |
echo $PATH
bats -T -p tests
local_test_home_trigger_cache:
needs: [local_test_home]
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
runs-on: ubuntu-latest
env:
BATS_LIB_PATH: "${{ github.workspace }}/tests"
TERM: xterm
name: local default cache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: bats-action
uses: ./
with:
bats-version: ${{ matrix.version }}
support-clean: "false"
support-path: "${{ github.workspace }}/tests/bats-support"
assert-clean: "false"
assert-path: "${{ github.workspace }}/tests/bats-assert"
detik-clean: "false"
detik-path: "${{ github.workspace }}/tests/bats-detik"
file-clean: "false"
file-path: "${{ github.workspace }}/tests/bats-file"
- name: Execute test to check Bats-support
if: steps.bats-action.outputs.support-installed == 'true'
run: |
cd /tmp/bats-support/
bats test
- name: Execute test to check Bats-assert
if: steps.bats-action.outputs.assert-installed == 'true'
run: |
cd /tmp/bats-assert/
bats test
- name: Execute test to check Bats-detik
if: steps.bats-action.outputs.detik-installed == 'true'
run: |
cd /tmp/bats-detik/
bats tests
- name: Execute test to check Bats-file
if: steps.bats-action.outputs.file-installed == 'true'
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
run: |
cd /tmp/bats-file/
bats test
- name: Execute example tests
run:
bats -T -p tests