-
Notifications
You must be signed in to change notification settings - Fork 33
85 lines (82 loc) · 2.34 KB
/
tests.yml
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
84
85
name: Tests
on:
workflow_dispatch: ~
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
tavern:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- name: ⚡ Setup Golang
uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
- name: 🔨 Build
run: go build -v -o ./build/tavern ./tavern
- name: 🔎 Test
run: go test -v -race -coverprofile='coverage.out' -covermode=atomic ./tavern/...
- name: 📶 Upload Coverage Results
uses: codecov/codecov-action@v3
implants:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- if: matrix.os == 'windows-latest'
run: start-process -filepath powershell -ArgumentList '/c','Set-MpPreference -DisableRealtimeMonitoring $true' -verb RunAs
name: 👾 Disable defender
shell: powershell
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: '1.83.0'
default: true
profile: minimal
components: rustfmt, clippy
- name: Setup Rust (Loader)
uses: actions-rs/toolchain@v1
if: matrix.os == 'windows-latest'
with:
toolchain: 'nightly-2024-02-11'
default: false
profile: minimal
components: rust-src
- name: rust-cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "./implants/ -> ../target"
- if: matrix.os == 'windows-latest'
shell: powershell
name: Build reflective loader
run: |
cd ./bin/reflective_loader/
cargo +nightly-2024-02-11 build --release -Z build-std=core,compiler_builtins -Z build-std-features=compiler-builtins-mem
- name: Install latest nextest & cargo-llvm-cov release
uses: taiki-e/[email protected]
with:
tool: nextest,cargo-llvm-cov
- name: 🔎 Run tests
run: |
cd ./implants/ &&
cargo fmt --check &&
cargo llvm-cov nextest --lcov --output-path lcov.info
- name: 📶 Upload Coverage Results
uses: codecov/codecov-action@v3