ci: disable Go cache #1
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: e2e-macos | ||
on: | ||
workflow_call: | ||
inputs: | ||
arch: | ||
type: string | ||
required: true | ||
version: | ||
type: string | ||
required: true | ||
runner-type: | ||
type: string | ||
required: true | ||
test-command: | ||
type: string | ||
required: true | ||
permissions: | ||
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on. | ||
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings | ||
id-token: write | ||
# This is required for actions/checkout | ||
contents: read | ||
jobs: | ||
test: | ||
runs-on: | ||
[ | ||
"self-hosted", | ||
"macos", | ||
"${{ inputs.arch }}", | ||
"${{ inputs.version }}", | ||
"${{ inputs.runner-type }}", | ||
] | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
# We need to get all the git tags to make version injection work. See VERSION in Makefile for more detail. | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
submodules: recursive | ||
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: go.mod | ||
false | ||
- name: Set output variables | ||
id: vars | ||
run: | | ||
has_creds=${{ (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name) && github.actor != 'dependabot[bot]' }} | ||
echo "has_creds=$has_creds" >> $GITHUB_OUTPUT | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
if: ${{ steps.vars.outputs.has_creds == true }} | ||
with: | ||
role-to-assume: ${{ secrets.ROLE }} | ||
role-session-name: credhelper-test | ||
aws-region: ${{ secrets.REGION }} | ||
- name: Clean up previous files | ||
run: | | ||
sudo rm -rf /opt/finch | ||
sudo rm -rf ~/.finch | ||
sudo rm -rf ./_output | ||
if pgrep '^qemu-system'; then | ||
sudo pkill '^qemu-system' | ||
fi | ||
if pgrep '^socket_vmnet'; then | ||
sudo pkill '^socket_vmnet' | ||
fi | ||
- name: Install Rosetta 2 | ||
run: echo "A" | softwareupdate --install-rosetta || true | ||
- run: brew install lz4 automake autoconf libtool yq | ||
shell: zsh {0} | ||
- name: Build project | ||
run: | | ||
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" | ||
make | ||
shell: zsh {0} | ||
- name: Run e2e tests | ||
run: | | ||
git status | ||
git clean -f -d | ||
REGISTRY=${{ steps.vars.outputs.has_creds == true && env.REGISTRY || '' }} make ${{ inputs.test-command }} | ||
shell: zsh {0} |