2024-06-06 04:51:18 +00:00
|
|
|
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
|
2024-06-24 09:59:59 +00:00
|
|
|
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'
|
|
|
|
|
2024-06-06 04:51:18 +00:00
|
|
|
- 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'
|
|
|
|
|
2024-06-06 04:51:18 +00:00
|
|
|
- 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; }
|
|
|
|
|