-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from cateiru/v2
V2
- Loading branch information
Showing
941 changed files
with
169,467 additions
and
37,822 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,42 @@ | ||
root = "." | ||
testdata_dir = "testdata" | ||
tmp_dir = "tmp" | ||
|
||
[build] | ||
args_bin = [] | ||
bin = "/air_tmp" | ||
cmd = "go build -o /air_tmp -buildvcs=false ." | ||
delay = 0 | ||
exclude_dir = [] | ||
exclude_file = [] | ||
exclude_regex = ["_test.go"] | ||
exclude_unchanged = false | ||
follow_symlink = false | ||
full_bin = "" | ||
include_dir = ["src", "templates"] | ||
include_ext = ["go", "tpl", "tmpl", "html"] | ||
include_file = [] | ||
kill_delay = "0s" | ||
log = "build-errors.log" | ||
rerun = false | ||
rerun_delay = 500 | ||
send_interrupt = false | ||
stop_on_error = false | ||
|
||
[color] | ||
app = "" | ||
build = "yellow" | ||
main = "magenta" | ||
runner = "green" | ||
watcher = "cyan" | ||
|
||
[log] | ||
main_only = false | ||
time = false | ||
|
||
[misc] | ||
clean_on_exit = false | ||
|
||
[screen] | ||
clear_on_rebuild = false | ||
keep_scroll = true |
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,16 @@ | ||
.github/ | ||
.git | ||
|
||
# storybook | ||
.storybook/ | ||
storybook-static/ | ||
stories/ | ||
|
||
# other | ||
scripts/ | ||
|
||
.storage/ | ||
db/ | ||
.next/ | ||
.swc/ | ||
.data/ |
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,17 @@ | ||
build/ | ||
next.config.js | ||
.data/ | ||
.github/ | ||
.next/ | ||
.storage/ | ||
.swc/ | ||
src/ | ||
db/ | ||
scripts/ | ||
public/ | ||
storybook-static/ | ||
|
||
!stories/**/*.stories.tsx | ||
|
||
# app以下は.well-knownなどデフォルトでignoreされてしまう場合があるので、明示的にignoreしないようにする | ||
!app/**/*.tsx |
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,34 @@ | ||
{ | ||
"extends": [ | ||
"./node_modules/gts/", | ||
"next", | ||
"plugin:import/errors", | ||
"plugin:storybook/recommended" | ||
], | ||
"plugins": [ | ||
"prefer-arrow", | ||
"import" | ||
], | ||
"rules": { | ||
"prefer-arrow/prefer-arrow-functions": [ | ||
"error", | ||
{ | ||
"disallowPrototype": true, | ||
"singleReturnOnly": true, | ||
"classPropertiesAllowed": false | ||
} | ||
], | ||
"sort-imports": 0, | ||
"import/order": [ | ||
2, | ||
{ | ||
"alphabetize": { | ||
"order": "asc" | ||
} | ||
} | ||
], | ||
"react-hooks/exhaustive-deps": "off", | ||
"node/no-unpublished-import": "off", | ||
"node/no-unsupported-features/node-builtins": "off" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,50 +1,76 @@ | ||
|
||
name: Lint | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'api/**' | ||
- 'front/**' | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
nextjs: | ||
name: next test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: yarn install | ||
working-directory: ./front | ||
run: yarn install --dev | ||
- name: Run gts | ||
working-directory: ./front | ||
run: yarn lint | ||
- name: Build | ||
working-directory: ./front | ||
run: yarn build | ||
- uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.17.0 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: pnpm install | ||
run: pnpm i --frozen-lockfile | ||
- name: run gts | ||
run: pnpm lint | ||
- name: build | ||
run: pnpm build | ||
env: | ||
NEXT_PUBLIC_SERVER_API_HOST: 'https://api.staging.oreore.me' | ||
go: | ||
name: go test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
env: | ||
TZ: 'Asia/Tokyo' | ||
STORAGE_URL: 'localhost:4443' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
- name: Build | ||
working-directory: ./api | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
working-directory: ./api | ||
run: | | ||
docker-compose up -d | ||
go test ./... -v -coverpkg=./... -race -coverprofile=coverage.out -covermode=atomic | ||
- name: Upload coverage to Codecov | ||
working-directory: ./api | ||
run: bash <(curl -s https://codecov.io/bash) | ||
- uses: actions/checkout@v4 | ||
- name: setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: start database | ||
run: ./scripts/docker-compose-db.sh up -d | ||
- name: go module download | ||
run: go mod download | ||
- name: install tparse | ||
run: go install github.com/mfridman/tparse@latest | ||
- name: build | ||
run: go build -v ./... | ||
- name: test | ||
run: ./scripts/test.sh -cover -json | tee ./go-test.out | tparse | ||
- name: add job summary | ||
if: always() | ||
run: | | ||
tparse -all -file ./go-test.out -format markdown >> $GITHUB_STEP_SUMMARY | ||
- name: upload coverage to codecov | ||
uses: codecov/codecov-action@v3 |
Oops, something went wrong.