Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support windows and macos #15

Merged
merged 42 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
586faae
let's see all the issues :D
brokenpip3 Sep 14, 2024
4a3d21c
let's try the first move
brokenpip3 Sep 15, 2024
8accf80
let's see if bats support will works
brokenpip3 Sep 15, 2024
4ceba17
tentative #1
brokenpip3 Sep 15, 2024
d380e94
fixup!
brokenpip3 Sep 15, 2024
d112450
fixup!
brokenpip3 Sep 15, 2024
f2f2dba
fix install for macos, add bats lib path as output
brokenpip3 Sep 15, 2024
9ab8cbd
temporary set continue on error for detik
brokenpip3 Sep 15, 2024
b1077b6
debug
brokenpip3 Sep 15, 2024
c11017d
fixup!
brokenpip3 Sep 15, 2024
80f9f3d
make test macos compatible
brokenpip3 Sep 15, 2024
ea4d3ad
fixup!
brokenpip3 Sep 15, 2024
44ad0d9
construct BATS_LIB_PATH with each one library destination path
brokenpip3 Sep 16, 2024
23549e9
last 2 os version
brokenpip3 Sep 16, 2024
1d7f169
investigating
brokenpip3 Sep 16, 2024
f060b30
more debug
brokenpip3 Sep 23, 2024
07a36c8
fixup!
brokenpip3 Sep 23, 2024
746f1a0
different name
brokenpip3 Sep 23, 2024
59ff88d
try to redirect to a file
brokenpip3 Sep 23, 2024
1cd1574
try with a different step
brokenpip3 Sep 23, 2024
f539671
another tentative
brokenpip3 Sep 23, 2024
0e50ff4
another strategy
brokenpip3 Sep 23, 2024
a45ae28
fixup!
brokenpip3 Sep 23, 2024
3cfa3c6
cleanup!
brokenpip3 Sep 23, 2024
23305f6
now should work
brokenpip3 Sep 23, 2024
c20afc4
wip: add more info in REAME.md
brokenpip3 Sep 23, 2024
65835b2
matrix everywhere
brokenpip3 Sep 23, 2024
c0acfce
less matrix jobs, 115 are too much
brokenpip3 Sep 23, 2024
291b82b
remove ls -l
brokenpip3 Sep 23, 2024
060541b
fixup!
brokenpip3 Sep 23, 2024
ad8a230
fixup!
brokenpip3 Sep 23, 2024
a2ea7da
use the default RUNNER_OS and fix lib path in windows
brokenpip3 Sep 24, 2024
4823008
handling windows special cases
brokenpip3 Sep 24, 2024
f0f8b17
temporary disable windows sanitizer
brokenpip3 Sep 25, 2024
f430596
merge and fix conflicts
brokenpip3 Sep 25, 2024
0a1d9f2
yet another windows fix
brokenpip3 Sep 26, 2024
79304ae
Merge remote-tracking branch 'origin/feat-support-windows-mac' into f…
brokenpip3 Sep 26, 2024
78339a5
Merge remote-tracking branch 'origin/main' into feat-support-windows-mac
brokenpip3 Sep 26, 2024
662bab2
fix macos install -D (again)
brokenpip3 Sep 26, 2024
cb3c9e6
update README
brokenpip3 Sep 26, 2024
9d32bb0
simplify triggering the cache test
brokenpip3 Sep 26, 2024
5704f54
bump detik version
brokenpip3 Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 44 additions & 43 deletions .github/workflows/test-local-action-inside-home.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Test local action inside $HOME"
name: CI
on:
workflow_dispatch:
pull_request:
Expand All @@ -13,17 +13,17 @@ jobs:
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
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:
BATS_LIB_PATH: "${{ github.workspace }}/tests"
TERM: xterm
name: local default
name: local-inside-home
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: bats-action
id: setup-bats
uses: ./
with:
bats-version: ${{ matrix.version }}
Expand All @@ -36,30 +36,51 @@ jobs:
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'
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/bats-support/
cd ${TMP_PATH}/bats-support/
bats test
- name: Execute test to check Bats-assert
if: steps.bats-action.outputs.assert-installed == 'true'
- 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: |
ls -l $BATS_LIB_PATH/
cd /tmp/bats-assert/
cd ${TMP_PATH}/bats-assert/
bats test
- name: Execute test to check Bats-detik
if: steps.bats-action.outputs.detik-installed == 'true'
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/bats-detik/
cd ${TMP_PATH}/bats-detik/
bats tests
- name: Execute test to check Bats-file
if: steps.bats-action.outputs.file-installed == 'true'
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/bats-file/
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
Expand All @@ -70,16 +91,16 @@ jobs:
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
os: [ ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
BATS_LIB_PATH: "${{ github.workspace }}/tests"
TERM: xterm
name: local default cache
name: local-inside-home-cache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: bats-action
id: setup-bats
uses: ./
with:
bats-version: ${{ matrix.version }}
Expand All @@ -91,29 +112,9 @@ jobs:
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
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
run:
bats -T -p tests
27 changes: 20 additions & 7 deletions .github/workflows/test-local-action-with-conditionals.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Test local with conditionals"
name: CI
on:
workflow_dispatch:
pull_request:
Expand All @@ -13,16 +13,17 @@ jobs:
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
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:
BATS_LIB_PATH: "/usr/lib"
TERM: xterm
name: local with options
name: local-options
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: setup-bats
uses: ./
with:
bats-version: ${{ matrix.version }}
Expand All @@ -31,13 +32,25 @@ jobs:
detik-install: "true"
file-install: "true"
- name: Execute test to check Bats-support
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd /tmp/bats-support/
cd ${TMP_PATH}/bats-support/
bats test
- name: Execute test to check Bats-assert
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd /tmp/bats-assert/
cd ${TMP_PATH}/bats-assert/
bats test
- name: Execute example tests
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run:
bats -T -p tests
72 changes: 40 additions & 32 deletions .github/workflows/test-local-action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Test local action"
name: CI
on:
workflow_dispatch:
pull_request:
Expand All @@ -13,17 +13,17 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest ]
version: ["1.7.0", "1.9.0", "1.11.0", "latest"]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
BATS_LIB_PATH: "/usr/lib"
TERM: xterm
name: local default
name: local
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: setup-bats
uses: ./
with:
bats-version: ${{ matrix.version }}
Expand All @@ -32,25 +32,46 @@ jobs:
detik-clean: "false"
file-clean: "false"
- name: Execute test to check Bats-support
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd /tmp/bats-support/
cd ${TMP_PATH}/bats-support/
echo $BATS_LIB_PATH
bats test
- name: Execute test to check Bats-assert
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd /tmp/bats-assert/
cd ${TMP_PATH}/bats-assert/
bats test
- name: Execute test to check Bats-detik
shell: bash
continue-on-error: true
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd /tmp/bats-detik/
cd ${TMP_PATH}/bats-detik/
bats tests
- name: Execute test to check Bats-file
shell: bash
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd /tmp/bats-file/
cd ${TMP_PATH}/bats-file/
bats test
- name: Execute example tests
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
shell: bash
run:
bats -T -p tests

Expand All @@ -59,40 +80,27 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest ]
version: ["1.7.0", "1.9.0", "1.11.0", "latest"]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
BATS_LIB_PATH: "/usr/lib"
TERM: xterm
name: local default cache
name: local-default-no-cache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
uses: ./
id: setup-bats
with:
bats-version: ${{ matrix.version }}
support-clean: "false"
assert-clean: "false"
detik-clean: "false"
file-clean: "false"
- name: Execute test to check Bats-support
run: |
cd /tmp/bats-support/
bats test
- name: Execute test to check Bats-assert
run: |
cd /tmp/bats-assert/
bats test
- name: Execute test to check Bats-detik
run: |
cd /tmp/bats-detik/
bats tests
- name: Execute test to check Bats-file
# 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
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
shell: bash
run:
bats -T -p tests
Loading
Loading