mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
* fix: fix go test errors * Add flags to mac test * Run on all branches * Update PR workflow Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
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/verify-changed-files@v11.1
|
|
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."
|
|
|
|
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.18, 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 ./...
|