linting #20
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: "GitHub Action: Self-Test" | |
on: | |
push: | |
env: | |
PRODUCT_VERSION: "0.1.1" | |
PRODUCT_HASH: "5159a77" | |
jobs: | |
setup-nomad-pack: | |
name: Test `setup-nomad-pack` | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup `nomad-pack` (using local GitHub Action) | |
uses: "./" | |
id: setup | |
with: | |
version: ${{ env.PRODUCT_VERSION }} | |
- name: Print `$PATH` for `nomad-pack` | |
run: which nomad-pack | |
- name: Print `nomad-pack` version | |
run: nomad-pack version | |
- name: Validate `nomad-pack` version is accurate | |
run: "nomad-pack version | grep --silent 'Nomad Pack v${{ env.PRODUCT_VERSION }} (${{ env.PRODUCT_HASH }})'" | |
- name: Run `nomad-pack render` | |
run: nomad-pack render --auto-approve "./test/" | |
- name: Setup `nomad-pack` with an invalid version (using local GitHub Action) | |
uses: "./" | |
id: invalid_version | |
with: | |
version: "invalid_version" | |
continue-on-error: true | |
- name: Validate invalid version failed | |
if: steps.invalid_version.outcome == 'success' | |
run: echo "Installing an invalid version expected to fail but did not" && exit 1 | |
# Testing against `latest` doesn't work with pre-release versions, so this is temporarily disabled: | |
# - name: Setup `nomad-pack` with `latest` version (using local GitHub Action) | |
# uses: "./" | |
# id: latest_version | |
# with: | |
# version: "latest" | |
- name: Print `nomad-pack` version | |
run: nomad-pack version |