Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: yes #36

Merged
merged 26 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
540dc5f
Merge pull request #38 from satisfactorymodding/staging
Vilsol Jan 6, 2024
f9b7136
Merge pull request #39 from satisfactorymodding/staging
Vilsol Jan 6, 2024
620830d
Merge pull request #40 from satisfactorymodding/staging
Vilsol Jan 6, 2024
c1eba24
Merge pull request #41 from satisfactorymodding/staging
Vilsol Jan 6, 2024
0eef1d8
Merge pull request #42 from satisfactorymodding/staging
Vilsol Jan 6, 2024
ab5d04f
Merge pull request #43 from satisfactorymodding/staging
Vilsol Jan 8, 2024
1c3ba0e
Merge branch 'staging'
Vilsol Mar 7, 2024
41077e3
refactor: yes
Vilsol Oct 21, 2023
a807c40
refactor: more yes
Vilsol Oct 21, 2023
5c19e40
feat: preliminary ent
Vilsol Oct 22, 2023
0a59acd
refactor: even more yes
Vilsol Oct 28, 2023
4478f03
chore: fix pipeline
Vilsol Oct 28, 2023
47d105e
refactor: move more stuff to ent
Vilsol Dec 1, 2023
5336524
chore: setup minio in ci
Vilsol Dec 1, 2023
3e302a0
chore: lint, ci feature flag
Vilsol Dec 1, 2023
d8bd919
chore: lint
Vilsol Dec 1, 2023
a0148ac
fix: retry metadata extraction
Vilsol Dec 1, 2023
020e7ce
chore: remove debug
Vilsol Dec 1, 2023
cf1166e
chore: run test for longer
Vilsol Dec 1, 2023
1553de5
refactor: more ent
Vilsol Dec 4, 2023
47b9d26
fix: login
Vilsol Dec 11, 2023
6888162
refactor: gorm gone
Vilsol Dec 12, 2023
237f16e
chore: bump dependency versions
Vilsol Jun 17, 2024
5e6268e
chore: upgrade and fix linter
Vilsol Jun 17, 2024
90dd27e
chore: fix rebase issues
Vilsol Jun 17, 2024
adf0cbe
chore: fix lint
Vilsol Jun 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use nix
use flake
18 changes: 13 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.22.3

- name: Check out code into the Go module directory
uses: actions/checkout@v3
Expand All @@ -25,7 +25,7 @@ jobs:
run: go generate -tags tools -x ./...

- name: Build
run: go build -v -o api-linux-amd64 .
run: go build -v -o api-linux-amd64 cmd/api/serve.go
env:
CGO_ENABLED: 1

Expand All @@ -36,7 +36,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.22.3

- name: Check out code into the Go module directory
uses: actions/checkout@v3
Expand All @@ -53,7 +53,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
version: v1.59.1
skip-pkg-cache: true
skip-build-cache: true
args: --timeout 5m
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21

- name: Check out code into the Go module directory
uses: actions/checkout@v3
Expand All @@ -82,12 +82,20 @@ jobs:
- name: Start stack
run: docker-compose -f docker-compose-dev.yml up -d

- name: Setup Minio
run: |
go install github.com/minio/mc@latest
mc alias set local http://localhost:9000 minio minio123
mc admin user svcacct add local minio --access-key REPLACE_ME_KEY --secret-key REPLACE_ME_SECRET
mc anonymous set public local/smr

- name: Test
run: go test -v -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... ./...
env:
CGO_ENABLED: 1
REPO_PASETO.PUBLIC_KEY: 408c5155a389aeabf1c1b0da73ff5a3079b6aa6628e4c661b1e1ce412181cc8a
REPO_PASETO.PRIVATE_KEY: a5f7409588f6b72d443db0d432f37f1214a5ec88cb55a70e24b90194ed549465408c5155a389aeabf1c1b0da73ff5a3079b6aa6628e4c661b1e1ce412181cc8a
REPO_FEATURE_FLAGS.ALLOW_MULTI_TARGET_UPLOAD: "true"

- name: Codecov
uses: codecov/codecov-action@v1
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21

- name: Check out code into the Go module directory
uses: actions/checkout@v3
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ modules.xml

config.json
vendor/
/docs/
/paks/
*.smod
*.smod

/.direnv
41 changes: 30 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ linters-settings:
- .Errorf(
- errors.New(
- errors.Unwrap(
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
Expand All @@ -15,8 +13,6 @@ linters-settings:
- github.com/satisfactorymodding/smr-api/*

govet:
check-shadowing: true
enable-all: true
disable:
- shadow

Expand All @@ -33,14 +29,31 @@ linters-settings:
- blank
- dot

run:
skip-files:
- ./generated/generated.go
- ./generated/models_gen.go
skip-dirs:
- ./docs/
sloglint:
attr-only: true
context: scope
forbidden-keys:
- time
- level
- msg
- source

spancheck:
checks:
- end
- record-error
- set-status
extra-start-span-signatures:
- github.com/satisfactorymodding/smr-api/gql.WrapQueryTrace:opentelemetry
- github.com/satisfactorymodding/smr-api/gql.WrapMutationTrace:opentelemetry


issues:
exclude-files:
- ./generated/generated.go
- ./generated/models_gen.go
exclude-dirs:
- ./generated/
exclude:
- should pass the context parameter

Expand All @@ -58,7 +71,6 @@ linters:
- contextcheck
- durationcheck
- errorlint
- goconst
- goimports
- revive
- misspell
Expand All @@ -69,3 +81,10 @@ linters:
- gocritic
- gofumpt
- nonamedreturns
- inamedparam
- sloglint
- spancheck
- intrange
- copyloopvar
- fatcontext
- canonicalheader
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine3.18 AS builder
FROM golang:1.21-alpine3.18 AS builder

RUN apk add --no-cache git build-base libpng-dev protoc
RUN go install google.golang.org/protobuf/cmd/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SMR API ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/satisfactorymodding/smr-api/build) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/satisfactorymodding/smr-api) [![codecov](https://codecov.io/gh/satisfactorymodding/smr-api/branch/master/graph/badge.svg?token=LFNKYWS0N2)](https://codecov.io/gh/satisfactorymodding/smr-api) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/satisfactorymodding/smr-api)
# SMR API [![build](https://github.com/satisfactorymodding/smr-api/actions/workflows/build.yml/badge.svg)](https://github.com/satisfactorymodding/smr-api/actions/workflows/build.yml) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/satisfactorymodding/smr-api) [![codecov](https://codecov.io/gh/satisfactorymodding/smr-api/branch/master/graph/badge.svg?token=LFNKYWS0N2)](https://codecov.io/gh/satisfactorymodding/smr-api) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/satisfactorymodding/smr-api)

The Satisfactory Mod Repository backend API

Expand Down
Loading
Loading