CI #50
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
merge_group: | |
jobs: | |
test: | |
name: test ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: "Fetch latest Scarb version from GitHub releases" | |
id: version | |
shell: pwsh | |
run: | | |
$location = (Invoke-WebRequest -Uri "https://github.com/software-mansion/scarb/releases/latest" -Method Head -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction Ignore).Headers.Location | |
$latest_version = ($location -replace '^.*/v','') | |
echo "Latest Scarb version found is $latest_version" | |
echo "LATEST_VERSION=$latest_version" >> $env:GITHUB_OUTPUT | |
$location = (Invoke-WebRequest -Uri "https://github.com/software-mansion/scarb-nightlies/releases/latest" -Method Head -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction Ignore).Headers.Location | |
$latest_version = ($location -replace '^.*/nightly-','nightly-') | |
echo "Latest Scarb nightly version found is $latest_version" | |
echo "LATEST_NIGHTLY_VERSION=$latest_version" >> $env:GITHUB_OUTPUT | |
- name: "Check Scarb latest" | |
uses: asdf-vm/actions/plugin-test@v3 | |
with: | |
command: scarb --version | grep "scarb ${{ steps.version.outputs.LATEST_VERSION }}" | |
- name: "Check Scarb v0.5.2" | |
uses: asdf-vm/actions/plugin-test@v3 | |
with: | |
skip_install: true | |
version: 0.5.2 | |
command: scarb --version | grep "scarb 0.5.2" | |
- name: "Check Scarb latest:nightly" | |
uses: asdf-vm/actions/plugin-test@v3 | |
with: | |
skip_install: true | |
version: latest:nightly | |
command: scarb --version | grep "${{ steps.version.outputs.LATEST_NIGHTLY_VERSION }}" | |
- name: "Check Scarb nightly-2023-08-10" | |
uses: asdf-vm/actions/plugin-test@v3 | |
with: | |
skip_install: true | |
version: nightly-2023-08-10 | |
command: scarb --version | grep "scarb 0.6.0+nightly-2023-08-10" | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: shellcheck bin/* lib/* | |
shfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: mfinelli/setup-shfmt@v3 | |
- uses: actions/checkout@v4 | |
- run: shfmt --diff . |