Skip to content

Commit

Permalink
actions: add staticcheck action separate from build&test
Browse files Browse the repository at this point in the history
updated README
  • Loading branch information
Wessie committed Feb 21, 2024
1 parent f7630ac commit 83568bf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/staticcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "staticcheck"
on: ["push", "pull_request"]

jobs:
staticcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: dominikh/[email protected]
13 changes: 2 additions & 11 deletions .github/workflows/go.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Build and Test
name: test
on: [push, pull_request]
jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -36,9 +33,3 @@ jobs:

- name: Test
run: go test -v ./...

- name: Staticcheck
uses: dominikh/[email protected]
with:
install-go: false

22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# valkyrie
[![Go Reference](https://pkg.go.dev/badge/github.com/R-a-dio/valkyrie.svg)](https://pkg.go.dev/github.com/R-a-dio/valkyrie)
![Test](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)
![Staticcheck](https://github.com/github/docs/actions/workflows/staticcheck.yml/badge.svg)

Repository of rebirth

Installation
=====

`git clone https://github.com/R-a-dio/valkyrie.git` into location of your choosing because we use the new go modules that don't require a `GOPATH`. To avoid weird tooling issues it's best to completely avoid your `GOPATH` when working with modules so don't clone it into your `GOPATH`.
`git clone https://github.com/R-a-dio/valkyrie.git`

Required
-----
- Go version 1.12+
- Go version 1.21+
- MySQL/MariaDB

Optional
Expand All @@ -18,8 +22,11 @@ for work and running of `streamer/`
- ffprobe
- libmp3lame-dev

for work in `rpc/`
- [twirp](https://twitchtv.github.io/twirp/docs/install.html)
for work in `rpc/` and running `go generate`
- [protoc](https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation)
- `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest`
- `go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest`
- `go install github.com/matryer/moq@latest`

Building
=====
Expand All @@ -34,9 +41,4 @@ an example configuration file is included as `example.toml`. Other documentation
- the flag `-config` given to the executable
- the environment variable `HANYUU_CONFIG` which can either be a relative or absolute path

You can also run `hanyuu config` to see what the currently loaded configuration looks like, the output is a valid TOML file so can also be piped into a file if so desired

Before you commit
-----

If you've edited `rpc/radio.proto` or added a migration file under `migrations/` you should run `go generate` before you commit.
You can also run `hanyuu config` to see what the currently loaded configuration looks like, the output is a valid TOML file so can also be piped into a file if so desired

0 comments on commit 83568bf

Please sign in to comment.