-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
84 lines (73 loc) · 2.21 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
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
name: PR Checks
on:
pull_request:
pull_request_review:
types: [submitted]
jobs:
check_docs:
name: Check Docs
if: ${{github.repository == 'wailsapp/wails' && contains(github.head_ref,'feature/')}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-changed-files
with:
files: |
website/**/*.mdx
website/**/*.md
- name: Run step only when files change.
if: steps.verify-changed-files.outputs.files_changed != 'true'
run: |
echo "::warning::Feature branch does not contain any changes to the website."
# lint_go:
# name: Run Go Linters
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - name: Setup Go
# uses: actions/setup-go@v4
# with:
# go-version: "1.21"
#
# - name: Update go modules
# working-directory: ./v2
# run: go mod tidy
#
# - name: Run Linter
# uses: golangci/golangci-lint-action@v3
# with:
# version: v1.54
# working-directory: ./v2
# args: --timeout=10m0s --config ./.golangci.yml
test_go:
name: Run Go Tests
runs-on: ${{ matrix.os }}
if: github.event.review.state == 'approved'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: [1.19]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Run tests (mac)
if: matrix.os == 'macos-latest'
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
working-directory: ./v2
run: go test -v ./...
- name: Run tests (!mac)
if: matrix.os != 'macos-latest'
working-directory: ./v2
run: go test -v ./...