Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c7b64e3
govulncheck
jakedoublev Feb 5, 2024
6959c16
put back local filepath import requirement for opentdf-v2-poc now tha…
jakedoublev Feb 5, 2024
038f8a5
use github token to run the scan so import of private modules is poss…
jakedoublev Feb 5, 2024
1109e23
pr title workflow
jakedoublev Feb 5, 2024
36adda7
add names to workflows
jakedoublev Feb 5, 2024
04b0656
trigger conventional commit check on PR
jakedoublev Feb 5, 2024
8d2ed47
clean pr lint trigger after demonstrating success
jakedoublev Feb 5, 2024
bacd674
Merge branch 'main' into issue-39/pipeline
jakedoublev Feb 5, 2024
43bf70b
remove pr-lint workflow outside .github dir
jakedoublev Feb 5, 2024
5bfac0a
ci pipeline updates
jakedoublev Feb 5, 2024
f98afa4
test security check with org PAT token
jakedoublev Feb 5, 2024
5919179
test PAT in security check
jakedoublev Feb 5, 2024
c5bd462
test env in the job and not the step
jakedoublev Feb 5, 2024
e9ab419
make sure the GH token is supplied and so is the PAT
jakedoublev Feb 5, 2024
849fdcb
test using gh app and generated token in security-check run
jakedoublev Feb 5, 2024
c4413f0
test that token was populated
jakedoublev Feb 5, 2024
64d26fe
test private key was added
jakedoublev Feb 5, 2024
2a88f3a
test fix
jakedoublev Feb 5, 2024
0ef0337
test fix
jakedoublev Feb 5, 2024
f11d9a3
test fix
jakedoublev Feb 5, 2024
6bec976
test fix conditional:
jakedoublev Feb 5, 2024
4ebf435
fix test workflows and remove token test script
jakedoublev Feb 5, 2024
90069b2
add golangcilint config
jakedoublev Feb 5, 2024
94bf6b8
use go version file
jakedoublev Feb 5, 2024
a7e5b89
Merge branch 'main' into issue-39/pipeline
jakedoublev Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: 'CI'

on:
pull_request:
branches:
- main

jobs:
golangci:
name: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
with:
version: v1.55
unit:
name: unit tests
runs-on: ubuntu-22.04
env:
GOPRIVATE: github.com/opentdf/opentdf-v2-poc/*
steps:
- name: Generate a token
id: generate_token
uses: actions/[email protected]
with:
app-id: '416599'
private-key: '${{ secrets.GH_APP_PRIVATE_KEY }}'
owner: ${{ github.repository_owner }}
repositories: 'opentdf-v2-poc'
- run: git config --global url.https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/.insteadOf https://github.com/
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
cache: false
- name: Unit Tests with the Go CLI
run: go test ./... -short -race -cover
end-to-end:
name: e2e tests
runs-on: ubuntu-22.04
env:
GOPRIVATE: github.com/opentdf/opentdf-v2-poc/*
steps:
- name: Generate a token
id: generate_token
uses: actions/[email protected]
with:
app-id: '416599'
private-key: '${{ secrets.GH_APP_PRIVATE_KEY }}'
owner: ${{ github.repository_owner }}
repositories: 'opentdf-v2-poc'
- run: git config --global url.https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/.insteadOf https://github.com/
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
cache: false
- name: e2e Tests
run: echo "No e2e tests yet." && exit 0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Lint PR"
name: '🧹 Lint PR Title'
on:
pull_request_target:
types:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/security-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: '🔍 Security Check'

on:
pull_request:
branches:
- main

jobs:
govulncheck_job:
runs-on: ubuntu-latest
name: Run govulncheck
env:
GOPRIVATE: github.com/opentdf/opentdf-v2-poc/*
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Generate a token
id: generate_token
uses: actions/[email protected]
with:
app-id: '416599'
private-key: '${{ secrets.GH_APP_PRIVATE_KEY }}'
owner: ${{ github.repository_owner }}
repositories: 'opentdf-v2-poc'
- run: git config --global url.https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/.insteadOf https://github.com/
- id: govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-file: go.mod
go-package: ./...
12 changes: 12 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
issues:
# Show only new issues: if there are unstaged changes or untracked files,
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
# It's a super-useful option for integration of golangci-lint into existing large codebase.
# It's not practical to fix all existing issues at the moment of integration:
# much better don't allow issues in new code.
#
# Default: false
new: true
# Show only new issues created after git revision `REV`.
# Default: ""
new-from-rev: HEAD