Skip to content

Commit

Permalink
Merge pull request #114 from boostcampwm-2024/Feature/#085_Github_Actโ€ฆ
Browse files Browse the repository at this point in the history
โ€ฆions_์„ค์ •

Feature/#85 PR ์‹œ Docker ๋นŒ๋“œ ํ…Œ์ŠคํŠธ ์ˆ˜ํ–‰
  • Loading branch information
github-actions[bot] authored Nov 14, 2024
2 parents 8d17632 + b3b09cf commit 5edb57a
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
deploy:
name: Deploy on Server
runs-on: [self-hosted, boost-was] # ๋ผ๋ฒจ์— ํ•ด๋‹นํ•˜๋Š” runner๋กœ ์‹คํ–‰

steps:
Expand Down
46 changes: 38 additions & 8 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Lint and Test

on:
push:
branches:
- "**"
pull_request:
branches:
- main
- dev

jobs:
lint_and_test:
name: Lint and Test
lint_and_unit_test:
name: Lint and Unit Test
runs-on: ubuntu-latest

steps:
Expand All @@ -34,9 +31,42 @@ jobs:
cache: "pnpm"

# Run lint
- name: Run lint
- name: Run Lint
run: pnpm eslint .

# Run tests
- name: Run tests
# Run Unit tests
- name: Run Unit Tests
run: pnpm test

test_building_docker_image:
name: Test Building Docker Image
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4

# Install Docker
- name: Install Docker
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
# Install Docker Compose
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Test Building Docker Images
- name: Test Building Docker Images
env:
NODE_ENV: production
MONGO_URI: ${{ secrets.MONGO_URI }}
run: |
docker-compose build frontend backend
38 changes: 38 additions & 0 deletions .github/workflows/lint_and_unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint and Unit Test

on:
push:
branches:
- "**"

jobs:
lint_and_unit_test:
name: Lint and Unit Test
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4

# Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: true

# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"

# Run lint
- name: Run Lint
run: pnpm eslint .

# Run Unit tests
- name: Run Unit Tests
run: pnpm test

0 comments on commit 5edb57a

Please sign in to comment.