Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
petergmurphy committed Oct 15, 2021
1 parent efe066f commit 69876ff
Show file tree
Hide file tree
Showing 7 changed files with 229 additions and 201 deletions.
94 changes: 47 additions & 47 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
@@ -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/...
62 changes: 31 additions & 31 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -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
90 changes: 45 additions & 45 deletions .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .github/workflows/installation.yml
Original file line number Diff line number Diff line change
@@ -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)"
30 changes: 15 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 69876ff

Please sign in to comment.