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

restruct frontend dir #128

Merged
merged 2 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/deploy-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy WebRTC

defaults:
run:
working-directory: ./frontend/
working-directory: ./frontend/site

on:
push:
Expand All @@ -28,8 +28,8 @@ jobs:
- name: Build
uses: docker/build-push-action@v3
with:
context: ./frontend
file: ./frontend/Dockerfile
context: ./frontend/site
file: ./frontend/site/Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/ueckoken/plarail2022-frontend:${{ env.IMAGE_TAG }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Deploy WebRTC python server

defaults:
run:
working-directory: ./frontend/videoCast
working-directory: ./backend/multicaster

on:
push:
branches: [deployment]
paths: ["./frontend/videoCast/**"]
paths: ["./frontend/multicaster/**"]

jobs:
build:
Expand All @@ -30,8 +30,8 @@ jobs:
- name: Build
uses: docker/build-push-action@v3
with:
context: ./frontend/videoCast
file: ./frontend/videoCast/Dockerfile.python
context: ./backend/multicaster
file: ./backend/multicaster/Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/ueckoken/plarail2022-frontend-python:${{ env.IMAGE_TAG }}
otariidae marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-sender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy WebRTC sender

defaults:
run:
working-directory: ./frontend/
working-directory: ./frontend/momo_sender

on:
push:
Expand All @@ -29,8 +29,8 @@ jobs:
- name: Build
uses: docker/build-push-action@v3
with:
context: ./frontend/videoCast/
file: ./frontend/videoCast/Dockerfile.sender
context: ./frontend/momo_sender/
file: ./frontend/momo_sender/Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/ueckoken/plarail2022-webrtc-sender:${{ env.IMAGE_TAG }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-testing-receiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy WebRTC receiver testing

defaults:
run:
working-directory: ./frontend/
working-directory: ./frontend/skyway_receiver

on:
push:
Expand Down Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Build
uses: docker/build-push-action@v3
with:
context: ./frontend/videoCast/
file: ./frontend/videoCast/Dockerfile.receiver
context: ./frontend/skyway_receiver/
file: ./frontend/skyway_receiver/Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/ueckoken/plarail2022-receiver-test:${{ env.IMAGE_TAG }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
paths:
- "frontend/**/*"
- "backend/multicaster/*"
branches-ignore:
- "main"
- "deployment"
Expand All @@ -13,15 +14,15 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "frontend/"
working-directory: "frontend/site"
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ./frontend/.nvmrc
node-version-file: ./frontend/site/.nvmrc
cache: yarn
cache-dependency-path: ./frontend/yarn.lock
cache-dependency-path: ./frontend/site/yarn.lock
- run: yarn install --frozen-lockfile
- run: yarn fmt
- name: Count changes
Expand All @@ -38,19 +39,19 @@ jobs:
git push
if: steps.changes.outputs.count > 0

prettier-videocast:
prettier-momo-sender:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "frontend/videoCast"
working-directory: "frontend/momo_sender"
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ./frontend/videoCast/.nvmrc
node-version-file: ./frontend/momo_sender/.nvmrc
cache: npm
cache-dependency-path: ./frontend/videoCast/package-lock.json
cache-dependency-path: ./frontend/momo_sender/package-lock.json
- run: npm ci
- run: npm run fmt
- uses: EndBug/add-and-commit@v9
Expand All @@ -59,19 +60,40 @@ jobs:
author_email: [email protected]
message: format by prettier

black-videoCast:
prettier-skyway-receiver:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "frontend/videoCast"
working-directory: "frontend/skyway_receiver"
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ./frontend/skyway_receiver/.nvmrc
cache: npm
cache-dependency-path: ./frontend/skyway_receiver/package-lock.json
- run: npm ci
- run: npm run fmt
- uses: EndBug/add-and-commit@v9
with:
author_name: format BOT
author_email: [email protected]
message: format by prettier

black-multicaster:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "backend/multicaster"
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: ./frontend/videoCast/requirements-dev.txt
cache-dependency-path: ./backend/multicaster/requirements-dev.txt
- run: pip install -r requirements-dev.txt
- run: black .
- uses: EndBug/add-and-commit@v9
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Frontend build and test

defaults:
run:
working-directory: ./frontend
working-directory: ./frontend/site

on: push

Expand All @@ -14,13 +14,13 @@ jobs:
- uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/frontend/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('./frontend/**/yarn.lock') }}-${{ hashFiles('./frontend/**.[jt]s', './frontend/**.[jt]sx') }}
${{ github.workspace }}/frontend/site/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('./frontend/site/**/yarn.lock') }}-${{ hashFiles('./frontend/site/**.[jt]s', './frontend/site/**.[jt]sx') }}
- uses: actions/setup-node@v3
with:
node-version-file: ./frontend/.nvmrc
node-version-file: ./frontend/site/.nvmrc
cache: yarn
cache-dependency-path: ./frontend/yarn.lock
cache-dependency-path: ./frontend/site/yarn.lock
- name: dependency-install
run: yarn install --frozen-lockfile --immutable
- name: lint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: WebRTC receiver and sender build test
name: WebRTC sender build test

defaults:
run:
working-directory: ./frontend/videoCast
working-directory: ./frontend/momo_sender

on: push

Expand All @@ -13,9 +13,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ./frontend/videoCast/.nvmrc
node-version-file: ./frontend/momo_sender/.nvmrc
cache: npm
cache-dependency-path: ./frontend/videoCast/package-lock.json
cache-dependency-path: ./frontend/momo_sender/package-lock.json
- name: dependency-install
run: npm ci
- name: build
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/test-testing-receiver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: WebRTC receiver build test

defaults:
run:
working-directory: ./frontend/skyway_receiver

on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ./frontend/skyway_receiver/.nvmrc
cache: npm
cache-dependency-path: ./frontend/skyway_receiver/package-lock.json
- name: dependency-install
run: npm ci
- name: build
run: npm run build
Loading