-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (42 loc) · 1.22 KB
/
pr.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
name: Build and Test on Pull Request
on:
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
test:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
shell:
- pwsh
include:
- os: windows-latest
shell: pwsh
- os: windows-latest
shell: powershell
# NOTE: disable fail-fast to run tests on all platforms.
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test
uses: ./.github/actions/test
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
shell: ${{ matrix.shell }}
- name: Run Snyk to check for vulnerabilities
# NOTE: snyk/actions uses Container action that is only supported on Linux.
# NOTE: skip snyk/actions when PR is from forked repository.
if: runner.os == 'Linux' && github.event.pull_request.head.repo.full_name == github.repository
uses: snyk/actions/dotnet@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: --all-projects --org=krymtkts