diff --git a/.github/workflows/ws_tool.yaml b/.github/workflows/ws_tool.yaml index d1713202..edc0e1d7 100644 --- a/.github/workflows/ws_tool.yaml +++ b/.github/workflows/ws_tool.yaml @@ -28,3 +28,22 @@ jobs: submodules: recursive ref: ${{ github.event.pull_request.head.ref }} - run: ws_tool/test/bats/bin/bats ws_tool/test + + full-setup: + strategy: + matrix: + os: + # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories + - macos-13 # x86 + - macos-latest # aarch + - ubuntu-latest + permissions: + id-token: write + contents: read + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{ github.event.pull_request.head.ref }} + - run: bash ws_tool/test/ci_full_setup.bash diff --git a/ws_tool/test/ci.sh b/ws_tool/test/ci.sh deleted file mode 100644 index 184f9278..00000000 --- a/ws_tool/test/ci.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env sh - -set -xeuo pipefail - -rm -rf $HOME/.config/workstation - -unset WORKSTATION_DIR -export WORKSTATION_VERSION="$GITHUB_SHA" - -bash ws_install.sh - -~/.config/workstation/workstation_source/ws_tool/ws bootstrap -n angrist --initial-config-dir ./my_config - - - -if [ "$RUNNER_OS" == "macOS" ]; then - bash bootstrap-workstation.sh ci-macos $WORKSTATION_BOOTSTRAP_COMMIT -else - bash bootstrap-workstation.sh ci-ubuntu $WORKSTATION_BOOTSTRAP_COMMIT -fi diff --git a/ws_tool/test/ci_full_setup.bash b/ws_tool/test/ci_full_setup.bash new file mode 100644 index 00000000..4b8f0c01 --- /dev/null +++ b/ws_tool/test/ci_full_setup.bash @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -xeuo pipefail + +rm -rf $HOME/.config/workstation + +unset WORKSTATION_DIR +export WORKSTATION_VERSION="$GITHUB_SHA" + +bash <(curl "https://raw.githubusercontent.com/joelmccracken/workstation/${WORKSTATION_VERSION}/ws_tool/ws_install.sh") + +cd ~/.config/workstation/workstation_source/ws_tool + +if [ "$RUNNER_OS" == "macOS" ]; then + WORKSTATION_NAME=ci_macos +else + WORKSTATION_NAME=ci_ubuntu +fi + +ws_tool/ws bootstrap -n "$WORKSTATION_NAME" --initial-config-dir ./test/test_config