diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 909f7bb8..7c81b058 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,30 +16,6 @@ permissions: contents: read jobs: - examples: - runs-on: ubuntu-latest - name: Examples - steps: - - name: Harden Runner - uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 - with: - egress-policy: audit - - - name: Checkout Source - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - with: - go-version: '>= 1.21' - cache: true - - - name: Run example tests - run: | - make examples - unit: runs-on: ubuntu-latest name: Unit @@ -47,7 +23,10 @@ jobs: - name: Harden Runner uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 with: - egress-policy: audit + disable-sudo: true + egress-policy: block #audit + allowed-endpoints: > + github.com:443 - name: Checkout Source uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -62,7 +41,7 @@ jobs: - name: Run unit tests run: | - make unit + go test -count=1 -parallel=$(nproc) -timeout 30s -v ./corefunc/... acc: runs-on: ubuntu-latest @@ -83,7 +62,11 @@ jobs: - name: Harden Runner uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 with: - egress-policy: audit + disable-sudo: true + egress-policy: block # audit + allowed-endpoints: > + github.com:443 + releases.hashicorp.com:443 - name: Checkout Source uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -104,4 +87,4 @@ jobs: - name: Run acceptance tests run: | - make acc + TF_ACC=1 go test -run=TestAcc -count=1 -parallel=$(nproc) -timeout 30m -v ./corefuncprovider/... diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b18c97a5..7b3fc819 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -97,12 +97,12 @@ repos: language: system stages: [commit, push] - - id: actionlint - name: Actionlint - description: Lint GitHub Actions workflows - entry: bash -c 'actionlint' - language: system - stages: [commit, push] + # - id: actionlint + # name: Actionlint + # description: Lint GitHub Actions workflows + # entry: bash -c 'actionlint' + # language: system + # stages: [commit, push] - id: unconvert name: 'Go: unconvert (current GOOS/GOARCH)'