fix deprecated node16 version github actions@cache #214
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: macos | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
macos-test: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Upgrade zsh | |
run: brew install zsh | |
- name: Remove existing symlinks | |
run: | | |
rm -rf /usr/local/bin/aws | |
rm -rf /usr/local/bin/aws_completer | |
rm -rf /usr/local/bin/go | |
rm -rf /usr/local/bin/gofmt | |
# rm /usr/local/bin/2to3 | |
# rm /usr/local/bin/2to3-3.12 | |
# rm /usr/local/bin/2to3-3.11 | |
# rm /usr/local/bin/idle3.12 | |
# rm /usr/local/bin/pydoc3.12 | |
- name: Cache brew install step | |
uses: actions/cache@v4 | |
id: cache-setup | |
with: | |
path: | | |
/usr/local/Cellar | |
/usr/local/Homebrew | |
key: macos-setup-${{ runner.os }}-${{ hashFiles('**/Brewfile') }} | |
restore-keys: | | |
macos-setup-${{ runner.os }}- | |
- name: Setup environment variable if cache hit | |
if: steps.cache-setup.outputs.cache-hit == 'true' | |
run: echo "SKIP_BREW_BUNDLE=true" >> $GITHUB_ENV | |
- name: Run setup.sh | |
run: | | |
export HOMEBREW_BUNDLE_MAS_SKIP=$(brew bundle list --mas | paste -sd " " -) | |
${GITHUB_WORKSPACE}/setup.sh | |
env: | |
HOMEBREW_BUNDLE_BREW_SKIP: "go mono awscli" | |
HOMEBREW_BUNDLE_CASK_SKIP: "docker python@3.9 python@3.10 python@3.11 python@3.12" | |
# - name: Load .zshenv | |
# run: | | |
# zsh ~/.zshenv 2> error.log; cat error.log | |
# if [ -s error.log ]; then false; fi | |
# - name: Load .zshrc | |
# run: | | |
# export TERM="xterm-256color" | |
# source ~/.zshrc 2> error.log; cat error.log | |
# if [ -s error.log ]; then false; fi |