go-teeworlds-protocol/.github/workflows/main.yml

82 lines
1.7 KiB
YAML
Raw Normal View History

name: Go
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build
run: go build -v ./...
2024-06-24 04:26:43 +00:00
build-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build go snippets in readme
run: |
mkdir -p ~/.local/bin/
wget -O ~/.local/bin/lintdown.sh https://raw.githubusercontent.com/ChillerDragon/lintdown.sh/master/lintdown.sh
chmod +x ~/.local/bin/lintdown.sh
lintdown.sh README.md
2024-06-24 04:26:43 +00:00
2024-06-20 04:12:15 +00:00
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Test
run: go test -v ./...
2024-06-20 04:12:15 +00:00
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Format
run: diff -u <(echo -n) <(gofmt -d ./)
2024-06-25 04:11:48 +00:00
teeworlds:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check game messages
run: |
errors="$(grep -FA1 'System()' $(grep MsgGame -lr messages7/) | grep "return true")"
[ "$errors" = "" ] || { printf '%s\n' "$errors"; exit 1; }
- name: Check system messages
run: |
errors="$(grep -FA1 'System()' $(grep MsgSys -lr messages7/) | grep "return false")"
[ "$errors" = "" ] || { printf '%s\n' "$errors"; exit 1; }