Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 7 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ permissions:

jobs:
test-action:
runs-on: ubuntu-latest
strategy:
matrix:
os: [macos-12, macos-13, macos-14, macos-latest, ubuntu-latest]
use-cache: [true, false]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: ./
with:
project-path: 'testdata'
enable-cache: ${{ matrix.use-cache }}
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"

test-action-with-version:
Expand All @@ -42,17 +47,6 @@ jobs:
project-path: 'testdata'
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"

test-action-with-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: ./
with:
enable-cache: true
project-path: 'testdata'
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"

test-action-with-sha256-checksum:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -92,8 +86,7 @@ jobs:
uses: ./
with:
devbox-version: 0.9.1
enable-cache: true
refresh-cli: true
sha256-checksum: '3cf9bdffbdcc73f49f99f90df7092379589ef2e90f994cfc0163d2ff07a1f189'
sha256-checksum: 'e7793acf6dadecc6a04eb64d6352665698c75f6c9f59fbe3efee3b04dbec294d'
project-path: 'testdata'
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"
12 changes: 7 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ runs:
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
sudo mv /usr/local/bin/gtar /usr/local/bin/gtar.orig
echo "#!/bin/sh" >> /usr/local/bin/gtar
echo 'exec sudo /usr/local/bin/gtar.orig "$@"' >> /usr/local/bin/gtar
sudo chmod +x /usr/local/bin/gtar
gtar_path=$(which gtar)
sudo mv $gtar_path $gtar_path.orig
echo "#!/bin/sh" >> $gtar_path
echo "exec sudo $gtar_path.orig \"\$@\"" >> $gtar_path
sudo chmod +x $gtar_path
elif [ "$RUNNER_OS" == "Linux" ]; then
mkdir -p ~/.cache
mkdir -p ~/.local/bin
Expand Down Expand Up @@ -171,7 +172,8 @@ runs:
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
sudo mv /usr/local/bin/gtar.orig /usr/local/bin/gtar
gtar_path=$(which gtar)
sudo mv $gtar_path.orig $gtar_path
elif [ "$RUNNER_OS" == "Linux" ]; then
rm ~/.local/bin/tar
fi