Skip to content

Commit

Permalink
Migrate: Use config.yml to config (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi authored Apr 17, 2024
1 parent 3ba3a92 commit 782d5c4
Show file tree
Hide file tree
Showing 44 changed files with 885 additions and 766 deletions.
42 changes: 0 additions & 42 deletions .env.build

This file was deleted.

42 changes: 0 additions & 42 deletions .env.example

This file was deleted.

44 changes: 0 additions & 44 deletions .env.prod.example

This file was deleted.

43 changes: 0 additions & 43 deletions .env.test

This file was deleted.

11 changes: 8 additions & 3 deletions .github/workflows/backend-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ on:
paths:
- "backend/**"
- ".github/workflows/backend-*.yml"
- "Rakefile"
- "config.test.yml"
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get ruby version
id: ruby-version
run: |
Expand All @@ -21,6 +23,10 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ steps.ruby-version.outputs.RUBY_VERSION }}
- name: Setup .env
run: |
cp ./config.test.yml ./config.yml
rake configure
# - name: Cache gems
# uses: actions/cache@v3
# id: cache-gems
Expand Down Expand Up @@ -49,8 +55,7 @@ jobs:
run: |
pwd
cp ../docker-compose.dev.yml ../docker-compose.yml
docker compose --env-file ../.env.test --profile test up -d
cp ../.env.test ../.env
docker compose --env-file ../.env --profile test up -d
bundle exec rake parallel:setup
bundle exec rake parallel:spec
build:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/frontend-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,30 @@ on:
paths:
- "frontend/**"
- ".github/workflows/frontend-*.yml"
- "Rakefile"
- "config.test.yml"
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Setup .env
run: |
cp ./config.test.yml ./config.yml
rake configure
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8.6.1
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: frontend/.node-version
cache: "pnpm"
Expand All @@ -27,7 +37,6 @@ jobs:
- name: Run frontend lint
working-directory: ./frontend
run: |
cp ../.env.example .env
pnpm i
pnpm lint
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/sub-audio-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,35 @@ on:
paths:
- "sub-audio/**"
- ".github/workflows/sub-audio-*.yml"
- "Rakefile"
- "config.test.yml"
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Copy .env
run: cp .env.example .env
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Setup .env
run: |
cp ./config.test.yml ./config.yml
rake configure
- name: Setup python
uses: actions/setup-python@v4
with:
python-version-file: sub-audio/.python-version

- name: Install poetry
uses: Gr1N/setup-poetry@v8
uses: Gr1N/setup-poetry@v9
with:
poetry-version: 1.3.1
poetry-version: 1.8.2

- name: Config poetry
run: poetry config virtualenvs.create false
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/sub-chart-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,24 @@ on:
paths:
- "sub-chart/**"
- ".github/workflows/sub-chart-*.yml"
- "Rakefile"
- "config.test.yml"
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Setup .env
run: |
cp ./config.test.yml ./config.yml
rake configure
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/sub-image-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ on:
paths:
- "sub-image/**"
- ".github/workflows/sub-image-*.yml"
- "Rakefile"
- "config.test.yml"
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sub-image
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Setup .env
run: |
cp ./config.test.yml ./config.yml
rake configure
- name: Setup rust
run: |
rustup component add clippy
Expand All @@ -24,14 +31,14 @@ jobs:
- name: Cache target
uses: Swatinem/rust-cache@v2
- name: Run check
working-directory: ./sub-image
run: |
cargo clippy
cargo fmt -- --check
cargo test
- name: Build binary
if: github.ref_name == 'main'
working-directory: .
run: |
sudo apt-get update
sudo apt-get install -y g++-aarch64-linux-gnu
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,5 @@ test_results/*
!test_results/.gitkeep

sub-image/tmp

config.yml
7 changes: 0 additions & 7 deletions Makefile

This file was deleted.

Loading

0 comments on commit 782d5c4

Please sign in to comment.