Skip to content

Update test-linux.yml #108

Update test-linux.yml

Update test-linux.yml #108

Workflow file for this run

---
name: 🍎 Build (MacOS)
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: ☑️ ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
with:
scandir: "./Scripts/install.sh"
build:
runs-on: macos-latest
timeout-minutes: 30
needs: [shellcheck]
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: ⚙️ Determine Branch
id: branch
env:
HEAD_REF: ${{ github.head_ref }}
REF_NAME: ${{ github.ref_name }}
EVENT_NAME: ${{ github.event_name }}
run: |
# For PR events, use HEAD_REF; for push events, use REF_NAME
if [ "$EVENT_NAME" = "pull_request" ]; then
echo "branch=$HEAD_REF" >> $GITHUB_OUTPUT
else
echo "branch=$REF_NAME" >> $GITHUB_OUTPUT
fi
- name: ⚙️ Prepare
run: |
brew install zsh
- name: ⚙️ Build
env:
BRANCH_NAME: ${{ steps.branch.outputs.branch }}
run: |
# Use --no-git to prevent cloning and use the checked out code
# Use --target to build in the current directory
sh ./Scripts/install.sh --no-git --target=$(pwd) --branch="$BRANCH_NAME"
ls -la ./Src/zi
- name: ⚙️ Load
run: |
module_path+=( "$PWD/Src" )
zmodload zi/zpmod
zpmod source-study -l
shell: zsh {0}