-
Notifications
You must be signed in to change notification settings - Fork 21
46 lines (43 loc) · 1.29 KB
/
ci.yml
File metadata and controls
46 lines (43 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Tests
on:
push:
branches:
- 'main'
pull_request_target:
types: [opened, synchronize]
branches: ['*']
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.24
- name: Build
run: make build
- name: Test
run: go test -v -timeout=25m ./...
timeout-minutes: 25
env:
TF_ACC: 'true'
FIREHYDRANT_API_KEY: ${{ secrets.FIREHYDRANT_API_KEY }}
EXISTING_USER_EMAIL: 'ops+terraform-ci@firehydrant.io'