ci: run install_ci on head ref of submitted changes; fix install_ci execution on changes to workflow file #13
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: Install CI | |
on: | |
push: | |
paths: | |
- 'install.vsh' | |
- 'build.vsh' | |
- '**/install_ci.yml' | |
pull_request: | |
paths: | |
- 'install.vsh' | |
- 'build.vsh' | |
- '**/install_ci.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
install: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install V | |
uses: vlang/[email protected] | |
with: | |
check-latest: true | |
- name: Install via webscript (Windows) | |
if: runner.os == 'Windows' | |
run: curl -o install.vsh https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh; v run install.vsh; del install.vsh | |
- name: Install via webscript (nix) | |
if: runner.os != 'Windows' | |
run: v -e "$(curl https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh -fsSL)" | |
- name: Checkout v-analyzer | |
uses: actions/checkout@v4 | |
# While the webscript installation step tests the general functionality of direct installation via the web, | |
# regressions related to the install script would only become visible AFTER pushing changes to the main branch. | |
# We reduce the potential for errors by simulating downloading the script and running it separately. | |
- name: Install via local script | |
run: mv install.vsh /tmp/install.vsh && cd /tmp/ && v run install.vsh | |
- name: Check build success | |
run: ~/.config/v-analyzer/bin/v-analyzer --version |