Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: github actions hardening #190

Merged
merged 2 commits into from
Apr 28, 2021
Merged
Changes from all commits
Commits
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
28 changes: 19 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
name: ci

permissions:
contents: read

on:
push:
branches:
Expand All @@ -6,7 +11,6 @@ on:
schedule:
- cron: '17 12 * * 6'

name: ci
jobs:
test:
strategy:
Expand All @@ -16,7 +20,7 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # v2.1.3
with:
go-version: ${{ matrix.go-version }}
- name: Configure Go Environment
Expand All @@ -26,7 +30,9 @@ jobs:
- name: Go Environment
run: go env
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap

Expand All @@ -38,13 +44,13 @@ jobs:
run: ./script/coverage

- name: Upload Unit Test Coverage
uses: codecov/codecov-action@v1.0.5
uses: codecov/codecov-action@967e2b38a85a62bd61be5529ada27ebc109948c2 #v1.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: unittests.coverprofile
flags: unittests
- name: Upload Integration Test Coverage
uses: codecov/codecov-action@v1.0.5
uses: codecov/codecov-action@967e2b38a85a62bd61be5529ada27ebc109948c2 #v1.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: integration.coverprofile
Expand All @@ -58,7 +64,7 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # v2.1.3
with:
go-version: ${{ matrix.go-version }}
- name: Configure Go Environment
Expand All @@ -68,7 +74,9 @@ jobs:
- name: Go Environment
run: go env
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Lint
Expand All @@ -82,11 +90,13 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # v2.1.3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
persist-credentials: false
- name: Run Third-Party Tests
working-directory: ./tests/thirdparty
run: go test -pkgs packages.json