-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add test action * change to postgres * update migration * update action * update action * update action
- Loading branch information
Showing
5 changed files
with
80 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
APP_NAME=Goravel | ||
APP_ENV=local | ||
APP_KEY=h20Gmg7UIuUDD66gfUSUjIkPLU8KLqMK | ||
APP_DEBUG=true | ||
APP_URL=http://localhost | ||
APP_HOST=127.0.0.1 | ||
APP_PORT=3000 | ||
|
||
GRPC_HOST=127.0.0.1 | ||
GRPC_PORT=3001 | ||
|
||
JWT_SECRET=L9qknFZyWHDSVXXe1TjUsR7XQsxkbb8B | ||
|
||
LOG_CHANNEL=stack | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=postgres | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=5432 | ||
DB_DATABASE=goravel | ||
DB_USERNAME=goravel | ||
DB_PASSWORD=goravel | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD= | ||
REDIS_PORT=6379 | ||
|
||
MAIL_HOST= | ||
MAIL_PORT= | ||
MAIL_USERNAME= | ||
MAIL_PASSWORD= | ||
MAIL_FROM_ADDRESS= | ||
MAIL_FROM_NAME= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
jobs: | ||
ubuntu: | ||
strategy: | ||
matrix: | ||
go: [ "1.21", "1.22" ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up PostgreSQL | ||
uses: harmon758/postgresql-action@v1 | ||
with: | ||
postgresql version: '11' | ||
postgresql db: 'goravel' | ||
postgresql user: 'goravel' | ||
postgresql password: 'goravel' | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Go mod cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install dependencies | ||
run: go mod tidy | ||
- name: Run migrate | ||
run: go run . artisan migrate | ||
- name: Run tests | ||
run: go test -timeout 1h ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.idea | ||
.DS_Store | ||
.env | ||
storage/framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 7 additions & 10 deletions
17
database/migrations/20230219170634_create_users_table.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
CREATE TABLE users ( | ||
id bigint(20) unsigned NOT NULL AUTO_INCREMENT, | ||
name varchar(191) DEFAULT '' NOT NULL, | ||
avatar varchar(191) DEFAULT '' NOT NULL, | ||
created_at datetime(3) NOT NULL, | ||
updated_at datetime(3) NOT NULL, | ||
deleted_at datetime(3) DEFAULT NULL, | ||
PRIMARY KEY (id), | ||
KEY idx_users_created_at (created_at), | ||
KEY idx_users_updated_at (updated_at) | ||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; | ||
id SERIAL PRIMARY KEY NOT NULL, | ||
name varchar(255) DEFAULT '' NOT NULL, | ||
avatar varchar(255) DEFAULT '' NOT NULL, | ||
created_at timestamp NOT NULL, | ||
updated_at timestamp NOT NULL, | ||
deleted_at timestamp DEFAULT NULL | ||
); |