diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 0a09e7e1..caf4c080 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -1,50 +1,50 @@ -name: Acceptance +# name: Acceptance -on: - pull_request: - branches: [ main ] +# on: +# pull_request: +# branches: [ main ] -env: - go_version: 1.16 +# env: +# go_version: 1.16 -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - env: - GOPATH: ${{ github.workspace }} - TEST_ACCEPTANCE: true - TMP: ${{ github.workspace }}/tmp - TEMP: ${{ github.workspace }}/tmp - defaults: - run: - working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} - steps: - - uses: actions/checkout@v2 - with: - path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go_version }} - - name: Build nix - run: | - go get github.com/goreleaser/goreleaser - ./build.sh - if: runner.os != 'Windows' - env: - HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY_DEV }} - HONEYCOMB_DATASET: pct_dev - - name: Build Windows - run: | - go get github.com/goreleaser/goreleaser - ./build.ps1 - if: runner.os == 'Windows' - env: - HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY_DEV }} - HONEYCOMB_DATASET: pct_dev - - name: Test - run: go test -v ./acceptance/... +# jobs: +# build: +# strategy: +# fail-fast: false +# matrix: +# os: [ubuntu-latest, windows-latest, macos-latest] +# runs-on: ${{ matrix.os }} +# env: +# GOPATH: ${{ github.workspace }} +# TEST_ACCEPTANCE: true +# TMP: ${{ github.workspace }}/tmp +# TEMP: ${{ github.workspace }}/tmp +# defaults: +# run: +# working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} +# steps: +# - uses: actions/checkout@v2 +# with: +# path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} +# - name: Set up Go +# uses: actions/setup-go@v2 +# with: +# go-version: ${{ env.go_version }} +# - name: Build nix +# run: | +# go get github.com/goreleaser/goreleaser +# ./build.sh +# if: runner.os != 'Windows' +# env: +# HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY_DEV }} +# HONEYCOMB_DATASET: pct_dev +# - name: Build Windows +# run: | +# go get github.com/goreleaser/goreleaser +# ./build.ps1 +# if: runner.os == 'Windows' +# env: +# HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY_DEV }} +# HONEYCOMB_DATASET: pct_dev +# - name: Test +# run: go test -v ./acceptance/... diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 15242125..31128ae0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,38 +1,38 @@ -name: "CodeQL" +# name: "CodeQL" -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - schedule: - - cron: '44 9 * * 4' +# on: +# push: +# branches: [ main ] +# pull_request: +# branches: [ main ] +# schedule: +# - cron: '44 9 * * 4' -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write +# jobs: +# analyze: +# name: Analyze +# runs-on: ubuntu-latest +# permissions: +# actions: read +# contents: read +# security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'go' ] +# strategy: +# fail-fast: false +# matrix: +# language: [ 'go' ] - steps: - - name: Checkout repository - uses: actions/checkout@v2 +# steps: +# - name: Checkout repository +# uses: actions/checkout@v2 - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} +# - name: Initialize CodeQL +# uses: github/codeql-action/init@v1 +# with: +# languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v1 +# - name: Autobuild +# uses: github/codeql-action/autobuild@v1 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 +# - name: Perform CodeQL Analysis +# uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/codequality.yml b/.github/workflows/codequality.yml index b1be96a8..88353e1b 100644 --- a/.github/workflows/codequality.yml +++ b/.github/workflows/codequality.yml @@ -1,47 +1,47 @@ -name: codequality -on: [pull_request] +# name: codequality +# on: [pull_request] -env: - go_version: 1.16 +# env: +# go_version: 1.16 -jobs: - security: - name: gosec, Inspects source code for security problems - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v1 - - name: Run Gosec Security Scanner - uses: securego/gosec@master - with: - args: '-exclude-dir=testutils ./...' - format: - name: fmt, makes sure there are no formatting issues - runs-on: ubuntu-latest - steps: - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go_version }} - - - name: Check out code - uses: actions/checkout@v1 - - - name: Run fmt - run: make format - mod_tidy: - name: go mod tidy, makes sure are dependencies are cool - runs-on: ubuntu-latest - steps: - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go_version }} - - - name: Check out code - uses: actions/checkout@v1 - - - name: Run go mod tidy - run: make tidy +# jobs: +# security: +# name: gosec, Inspects source code for security problems +# runs-on: ubuntu-latest +# steps: +# - name: Check out code +# uses: actions/checkout@v1 +# - name: Run Gosec Security Scanner +# uses: securego/gosec@master +# with: +# args: '-exclude-dir=testutils ./...' +# format: +# name: fmt, makes sure there are no formatting issues +# runs-on: ubuntu-latest +# steps: +# - +# name: Set up Go +# uses: actions/setup-go@v2 +# with: +# go-version: ${{ env.go_version }} +# - +# name: Check out code +# uses: actions/checkout@v1 +# - +# name: Run fmt +# run: make format +# mod_tidy: +# name: go mod tidy, makes sure are dependencies are cool +# runs-on: ubuntu-latest +# steps: +# - +# name: Set up Go +# uses: actions/setup-go@v2 +# with: +# go-version: ${{ env.go_version }} +# - +# name: Check out code +# uses: actions/checkout@v1 +# - +# name: Run go mod tidy +# run: make tidy diff --git a/.github/workflows/installation.yml b/.github/workflows/installation.yml new file mode 100644 index 00000000..ac1499e3 --- /dev/null +++ b/.github/workflows/installation.yml @@ -0,0 +1,28 @@ +name: Install + +on: + pull_request: + branches: [ main ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + env: + TMP: ${{ github.workspace }}/tmp + TEMP: ${{ github.workspace }}/tmp + steps: + - uses: actions/checkout@v2 + - name: Install PCT (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: .\tools\install.ps1 + - name: Install PCT (Unix) + if: runner.os != 'Windows' + run: ./tools/install.sh + - name: Validate install (Unix) + if: runner.os != 'Windows' + run: $HOME/.puppetlabs/pct/pct --version | grep "pct $(git tag | tail -n 1)" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a6c6fc4e..e13f70ca 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,17 +1,17 @@ -name: Lint +# name: Lint -on: - pull_request: - branches: [ main ] +# on: +# pull_request: +# branches: [ main ] -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: v1.29 - only-new-issues: true +# jobs: +# golangci: +# name: lint +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - name: golangci-lint +# uses: golangci/golangci-lint-action@v2 +# with: +# version: v1.29 +# only-new-issues: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aff3daca..999a2760 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,43 +1,43 @@ -name: Release +# name: Release -on: - push: - tags: - - '*.*.*' +# on: +# push: +# tags: +# - '*.*.*' -env: - go_version: 1.16 +# env: +# go_version: 1.16 -jobs: - goreleaser: - runs-on: ubuntu-latest - env: - WORKINGDIR: ${{ github.workspace }} - steps: - - - name: Checkout pdkgo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Checkout PCT Templates - uses: actions/checkout@v2 - with: - repository: puppetlabs/baker-round - fetch-depth: 1 - path: templates - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go_version }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY_PROD }} - HONEYCOMB_DATASET: pct +# jobs: +# goreleaser: +# runs-on: ubuntu-latest +# env: +# WORKINGDIR: ${{ github.workspace }} +# steps: +# - +# name: Checkout pdkgo +# uses: actions/checkout@v2 +# with: +# fetch-depth: 0 +# - +# name: Checkout PCT Templates +# uses: actions/checkout@v2 +# with: +# repository: puppetlabs/baker-round +# fetch-depth: 1 +# path: templates +# - +# name: Set up Go +# uses: actions/setup-go@v2 +# with: +# go-version: ${{ env.go_version }} +# - +# name: Run GoReleaser +# uses: goreleaser/goreleaser-action@v2 +# with: +# version: latest +# args: release --rm-dist +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY_PROD }} +# HONEYCOMB_DATASET: pct diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbf5f913..8be8696c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,29 +1,29 @@ -name: Test +# name: Test -on: - pull_request: - branches: [ main ] +# on: +# pull_request: +# branches: [ main ] -env: - go_version: 1.16 +# env: +# go_version: 1.16 -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 +# jobs: +# build: +# strategy: +# fail-fast: false +# matrix: +# os: [ubuntu-latest, windows-latest, macos-latest] +# runs-on: ${{ matrix.os }} +# steps: +# - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go_version }} +# - name: Set up Go +# uses: actions/setup-go@v2 +# with: +# go-version: ${{ env.go_version }} - - name: Build - run: go build -v +# - name: Build +# run: go build -v - - name: Test - run: go test -v ./... +# - name: Test +# run: go test -v ./...