Skip to content

Commit

Permalink
chore: simplify and update github workflows (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
steverusso authored Feb 17, 2024
1 parent c0e3908 commit ce7832f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
45 changes: 17 additions & 28 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,36 @@ on:
workflow_dispatch:

jobs:
build:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.0
go-version: 1.22.0

- name: Install Gio Dependencies
run: sudo apt install gcc pkg-config libwayland-dev libx11-dev libx11-xcb-dev libxkbcommon-x11-dev libgles2-mesa-dev libegl1-mesa-dev libffi-dev libxcursor-dev libvulkan-dev

- name: Build
run: go build -v ./...

- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest

- name: Install gofumpt
run: go install mvdan.cc/gofumpt@latest
run: |
sudo apt update
sudo apt install gcc pkg-config libwayland-dev libx11-dev libx11-xcb-dev libxkbcommon-x11-dev libgles2-mesa-dev libegl1-mesa-dev libffi-dev libxcursor-dev libvulkan-dev
- name: Format
run: goimports -w . && gofumpt -w .
- run: go install golang.org/x/tools/cmd/goimports@latest
- run: go install honnef.co/go/tools/cmd/staticcheck@latest
- run: go install mvdan.cc/gofumpt@latest

- name: Verify
- name: Format and check
run: |
goimports -w .
gofumpt -w .
if [ -n "$(git diff)" ]; then
git diff
exit 1
fi
- name: Test
run: go test -v ./...

- name: Vet
run: go vet -v ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: staticcheck
run: staticcheck ./...
- run: go build -v ./...
- run: go test -v ./...
- run: go vet -v ./...
- run: staticcheck ./...
4 changes: 2 additions & 2 deletions .github/workflows/ghpages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.0

Expand Down

0 comments on commit ce7832f

Please sign in to comment.