From 6133a6a6b9bde462558c1a404c2e0a878dc98f3c Mon Sep 17 00:00:00 2001 From: eunhak Date: Thu, 9 May 2024 18:57:44 +0900 Subject: [PATCH] feat: git action ci --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fc81dd6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI + +on: + pull_request: + branches: + - main + - develop + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Create .env file + run: | + touch .env.local + echo "${{ secrets.ENV_DEVELOPMENT }}" > .env.local + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: '18' + - run: yarn install + - run: yarn lint + + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Create .env file + run: | + touch .env.local + echo "${{ secrets.ENV_DEVELOPMENT }}" > .env.local + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: '18' + - run: yarn install + - run: CI='false' yarn build + + test: + name: Test + runs-on: ubuntu-latest + + steps: + - name: Create .env file + run: | + touch .env.local + echo "${{ secrets.ENV_DEVELOPMENT }}" > .env.local + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: '18' + - run: yarn install + - run: yarn test