Skip to content

try strict

try strict #43

Workflow file for this run

name: Run Example Tests
on:
# schedule:
# - cron: '0 8 * * *'
workflow_dispatch: {}
push:
branches:
- justin/tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
# Checkout your project with git.
- name: Checkout
uses: actions/checkout@v3
# Install Go on the VM running the action.
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
# Install gotestfmt on the VM running the action.
- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
token: ${{ secrets.GITHUB_TOKEN }}
# Install pulumi.
- name: Install pulumi
uses: pulumi/actions@v4
with:
pulumi-version: 3.78.1
# Pre-install some needed plugins.
- name: Install pulumi plugins
run: |
pulumi plugin install resource aws
pulumi plugin install resource azure
pulumi plugin install resource gcp
pulumi plugin install resource kubernetes
pulumi plugin install resource random
pulumi plugin install resource std
# Build and install the converter.
- name: Build and install the converter
run: |
make install
# Run tests with nice formatting. Save the original log in /tmp/gotest.log
- name: Run tests
run: |
set -euo pipefail
cd tests && go test -json -v -timeout 6h -parallel 10 ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
# Upload the original go test log as an artifact for later review.
- name: Upload test log
uses: actions/upload-artifact@v3
if: always()
with:
name: test-log
path: /tmp/gotest.log
if-no-files-found: error