wails/.github/workflows/pr.yml
Lea Anthony a5fba5b218
Release/v2.1.0 (#1988)
* Add changelog. Fix zoom docs. Add Info.dev.plist info

* Update build assets README.md

* Update changelog

* actions/checkout@v2 => v3

* Docs
2022-10-18 07:21:07 +11:00

43 lines
1.2 KiB
YAML

name: PR Checks
on:
pull_request:
pull_request_review:
types: [ submitted ]
jobs:
check_branch_name:
runs-on: ubuntu-latest
if: github.repository == 'wailsapp/wails'
name: Check branch name
steps:
- run: |
if ! [[ "$(echo ${GITHUB_HEAD_REF} | cut -d "/" -f1)" =~ (feature|bugfix|release|chore) ]]; then
echo "PRs are only accepted for branches starting with: feature/, bugfix/, chore/ or release/"
exit 1
fi
shell: bash
test:
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: Set up Go 1.18
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test -v ./...