Skip to content

[create-pull-request] automated change (#21) #98

[create-pull-request] automated change (#21)

[create-pull-request] automated change (#21) #98

name: CI
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.9.0", "1.11.0", "latest"]
os: [ ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
TERM: xterm
name: local-inside-home
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: setup-bats
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.setup-bats.outputs.support-installed == 'true'
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-support/
bats test
- name: Execute test to check Bats-assert
if: steps.setup-bats.outputs.assert-installed == 'true'
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-assert/
bats test
- name: Execute test to check Bats-detik
if: steps.setup-bats.outputs.detik-installed == 'true'
# Currently the bats-detik tests are broken
# in macos
continue-on-error: ${{ runner.os == 'macOS' }}
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-detik/
bats tests
- name: Execute test to check Bats-file
if: steps.setup-bats.outputs.file-installed == 'true'
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
run: |
cd ${TMP_PATH}/bats-file/
bats test
- name: Execute example tests
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
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"]
os: [ ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
TERM: xterm
name: local-inside-home-cache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: setup-bats
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 example tests
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
run:
bats -T -p tests