Prints env vars #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Code Health | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
pull-requests: write # For PR-specific operations | |
issues: write # For commenting functionality | |
jobs: | |
github-actions-environment-variables-ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- name: List of the GitHub Actions environment variables on Windows | |
run: env | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
with: | |
config: ${{ vars.PERMISSIONS_CONFIG }} | |
- uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807 | |
- name: golangci-lint | |
uses: golangci/[email protected] | |
with: | |
version: v1.61.0 | |
unit-tests: | |
env: | |
COVERAGE: coverage.out | |
TEST_CMD: gotestsum --junitfile unit-tests.xml --format standard-verbose -- | |
UNIT_TAGS: unit | |
INTEGRATION_TAGS: integration | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
if: ${{ matrix.os=='ubuntu-latest' }} | |
with: | |
config: ${{ vars.PERMISSIONS_CONFIG }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- run: go install gotest.tools/gotestsum@latest | |
- run: make unit-test | |
- name: Test Summary | |
id: test_summary | |
uses: test-summary/[email protected] | |
with: | |
paths: unit-tests.xml | |
if: always() && matrix.os == 'ubuntu-latest' | |
- name: Upload coverage file | |
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-file | |
path: coverage.out |