-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (71 loc) · 2.03 KB
/
Copy pathe2e.yml
File metadata and controls
83 lines (71 loc) · 2.03 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: E2E Tests
on:
pull_request:
branches: [ main, release/* ]
paths-ignore:
- '**/*.md'
- '.github/**'
workflow_dispatch:
permissions:
contents: read
jobs:
e2e-native:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Restore Go build cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ steps.go.outputs.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gobuild-${{ steps.go.outputs.go-version }}-
- name: Build binary and add to path
run: |
make censys
export PATH=$PATH:$(pwd)/bin
- name: Run E2E tests
env:
CENSYS_API_TOKEN: ${{ secrets.CENSYS_API_TOKEN }}
CENSYS_ORG_ID: ${{ secrets.CENSYS_ORG_ID }}
CENCLI_ENABLE_E2E_TESTS: 'true'
run: make e2e
e2e-smoke:
strategy:
matrix:
os:
- ubuntu-latest # linux/amd64
- ubuntu-24.04-arm # linux/arm64
- macos-latest # darwin/arm64
- windows-latest # windows/amd64
- windows-11-arm # windows/arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Restore Go build cache
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gobuild-
- name: Add binary directory to PATH
run: |
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Run E2E smoke tests
env:
CENCLI_ENABLE_SMOKE_TEST: 'true'
run: make e2e