feat: cygwin and msys2 support (bash) #1135
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: [ master ] | |
pull_request: {} | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Go Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5.0.1 | |
with: | |
go-version: '1.20' | |
id: go | |
- name: Set up Python | |
if: runner.os != 'Windows' | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: "3.9" | |
id: python | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Build | |
env: | |
GO111MODULE: on | |
run: go build -v . | |
- name: Test | |
env: | |
GO111MODULE: on | |
run: go test -v ./... | |
- name: Test Host bash | |
# FIXME: make this work on Windows as well | |
if: runner.os != 'Windows' | |
env: | |
GO111MODULE: on | |
run: make test-stdlib test-bash | |
- name: GitHub Actions Env Test Setup | |
# FIXME: make this work on Windows as well | |
if: runner.os != 'Windows' | |
run: | | |
cd test/scenarios/github-actions/ | |
../../../direnv allow | |
../../../direnv export gha >> "$GITHUB_ENV" | |
- name: GitHub Actions Env Test Verification | |
# FIXME: make this work on Windows as well | |
if: runner.os != 'Windows' | |
run: | | |
[[ -z ${TEST_EXPORT_DIRENV_GITHUB_ACTIONS:-} ]] && echo "TEST_EXPORT_DIRENV_GITHUB_ACTIONS is unset or empty" >&2 && exit 1 | |
tee TEST_EXPORT_DIRENV_GITHUB_ACTIONS.got <<<"$TEST_EXPORT_DIRENV_GITHUB_ACTIONS" | |
echo "${GITHUB_SHA}"$'\n'"${GITHUB_RUN_ID}"$'\n'"${GITHUB_RUN_NUMBER}" | tee TEST_EXPORT_DIRENV_GITHUB_ACTIONS.want | |
diff -u TEST_EXPORT_DIRENV_GITHUB_ACTIONS.want TEST_EXPORT_DIRENV_GITHUB_ACTIONS.got |