Skip to content

Commit ef87a39

Browse files
Merge pull request Game-as-a-Service#114 from linycken013127/dev
v0.2.0 Release
2 parents 7a89308 + e0a140a commit ef87a39

File tree

78 files changed

+3425
-509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3425
-509
lines changed

Diff for: .editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
; https://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
insert_final_newline = true
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 2
11+
12+
[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
13+
indent_style = tab
14+
indent_size = 4
15+
16+
[*.md]
17+
indent_size = 4
18+
trim_trailing_whitespace = false
19+
20+
[Dockerfile]
21+
indent_size = 4

Diff for: .gitattributes

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Treat all files in the Go repo as binary, with no git magic updating
2+
# line endings. This produces predictable results in different environments.
3+
#
4+
# Windows users contributing to Go will need to use a modern version
5+
# of git and editors capable of LF line endings.
6+
#
7+
# Windows .bat files are known to have multiple bugs when run with LF
8+
# endings, and so they are checked in with CRLF endings, with a test
9+
# in test/winbatch.go to catch problems. (See golang.org/issue/37791.)
10+
#
11+
# We'll prevent accidental CRLF line endings from entering the repo
12+
# via the git-codereview gofmt checks and tests.
13+
#
14+
# See golang.org/issue/9281.
15+
16+
* -text
17+
*.go eol=lf diff=golang
18+
*.ts diff=typescript
19+
*.tsx diff=typescript
20+
*.json diff=json
21+
*.sql diff=sql
22+
*.md text diff=markdown

Diff for: .github/workflows/test-go-unit.yml

+21-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- .github/workflows/test-go-unit.yml
1212

1313
env:
14-
GO_VERSION: 1.21
14+
GO_VERSION: 1.22
1515

1616
jobs:
1717
build:
@@ -30,6 +30,13 @@ jobs:
3030
working-directory: ./Backend
3131
run: cp env .env
3232

33+
- name: Install dependencies
34+
working-directory: ./Backend
35+
run: |
36+
go mod tidy
37+
go mod download
38+
go mod vendor
39+
3340
- name: Build
3441
working-directory: ./Backend
3542
run: go build -v ./...
@@ -61,15 +68,15 @@ jobs:
6168

6269
services:
6370
mysql:
64-
image: mysql:8.1.0
71+
image: mysql:8.1
6572
env:
6673
MYSQL_ROOT_PASSWORD: ${{ secrets.DB_ROOT_PASSWORD }}
6774
MYSQL_DATABASE: test
6875
MYSQL_USER: user
6976
MYSQL_PASSWORD: ${{ secrets.DB_PASSWORD }}
7077
ports:
7178
- "3306:3306"
72-
79+
7380
runs-on: ubuntu-22.04
7481
steps:
7582
- name: Checkout code
@@ -83,9 +90,18 @@ jobs:
8390
working-directory: ./Backend
8491
run: cp env .env
8592

93+
- name: Wait for MySQL
94+
run: |
95+
wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
96+
chmod +x wait-for-it.sh
97+
./wait-for-it.sh 127.0.0.1:3306 --timeout=60
98+
8699
- name: Migration
87100
working-directory: ./Backend
88-
run: go run ./cmd/migrate/migrate.go
101+
run: |
102+
go run ./cmd/migrate/migrate.go
103+
go run ./cmd/migrate/game_card_seeder.go
104+
89105
- name: 🎯 Acceptance test
90106
working-directory: ./Backend
91107
run: go test ./... -v -count=1 -coverprofile=coverage.out
@@ -94,4 +110,4 @@ jobs:
94110
uses: actions/upload-artifact@v2
95111
with:
96112
name: acceptance-test-coverage-report
97-
path: ./Backend/coverage.out
113+
path: ./Backend/coverage.out

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Backend
22

3+
Backend/cmd/app/docs/swagger.*
34
Backend/.env
45
/.idea/*
6+
vendor/

0 commit comments

Comments
 (0)