fix: Add error catching for renderTemplate of index.html #141
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: Test | |
on: | |
pull_request: | |
jobs: | |
releases: | |
name: Releases page | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Set up gotestfmt | |
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
- name: Run tests | |
working-directory: releases-generator | |
run: | | |
set -euo pipefail | |
go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt | |
- name: Upload test log | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: test-log | |
path: /tmp/gotest.log | |
if-no-files-found: error | |
shellcheck: | |
name: Shellcheck | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install shellcheck | |
run: sudo apt-get install -y shellcheck | |
- name: Run shellcheck | |
working-directory: static | |
run: shellcheck -o all install-opentofu.sh | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
strategy: | |
fail-fast: true | |
matrix: | |
distro: [alpine, debian, fedora, opensuse, rocky, ubuntu] | |
method: [brew, repo, standalone] | |
shell: [ash, bash, dash, ksh, zsh] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
- name: Test | |
env: | |
DISTRO: ${{ matrix.distro }} | |
METHOD: ${{ matrix.method }} | |
SH: ${{ matrix.shell }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: tests/linux | |
run: ./test.sh | |
macos: | |
name: MacOS | |
runs-on: macos-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
method: [brew, standalone] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
- name: Test | |
working-directory: tests/macos | |
run: ./${{ matrix.method }}.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
widows: | |
name: Windows | |
runs-on: windows-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
method: [standalone] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
- name: Test | |
working-directory: tests\windows | |
run: .\test.ps1 -method "${{ matrix.method }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |