wails/.github/workflows/pr.yml
Lea Anthony 48b3fb0f51
Add PR checks (#1879)
* Add PR checks

* Update PR workflow

* Update PR workflow

* Update PR workflow

* Add branch name check + doc check

* Update PR branch check

* Update PR branch check

* Update PR branch check
2022-09-23 08:52:01 +10:00

40 lines
1.1 KiB
YAML

name: PR Checks
on:
pull_request:
jobs:
check_branch_name:
runs-on: ubuntu-latest
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 }}
needs: check_branch_name
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
go-version: [ 1.18, 1.19 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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 ./...