From e26df932953a417c7dd1469af819a0706d43b760 Mon Sep 17 00:00:00 2001 From: Mgrdich Date: Fri, 3 May 2024 18:23:09 +0400 Subject: [PATCH] chore: Pipeline CI initialization chore: Pipeline CI initialization chore: Pipeline CI fixes --- .github/workflows/frontend.yml | 72 ++++++++++++++++++++++++++++++++++ frontend/package.json | 4 ++ 2 files changed, 76 insertions(+) create mode 100644 .github/workflows/frontend.yml diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml new file mode 100644 index 0000000..536980a --- /dev/null +++ b/.github/workflows/frontend.yml @@ -0,0 +1,72 @@ +name: Frontend CI +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + +jobs: + setup-application: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: setup pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + standalone: true + dest: ~/setup-pnpm + + - name: setup node + uses: actions/setup-node@v4 + with: + node-version: "18.17.1" + cache: "pnpm" + cache-dependency-path: "./frontend/pnpm-lock.yaml" + + - name: install dependencies + run: | + cd ./frontend + pnpm install --frozen-lockfile + + - uses: actions/upload-artifact@v4 + with: + name: Upload node_modules + path: ./frontend/node_modules + + lint: + needs: setup-application + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Checkout code + uses: actions/checkout@v4 + + - name: setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: setup pnpm + uses: pnpm/action-setup@v3 + with: + version: "8.15.3" + run_install: false + standalone: true + dest: ~/setup-pnpm + + - uses: actions/download-artifact@v4 + with: + name: download node_modules + path: ./frontend/ + + - name: Lint code + run: | + cd ./frontend + pnpm lint \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 9ae1811..e783668 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -48,5 +48,9 @@ "karma-jasmine-html-reporter": "~2.1.0", "prettier-eslint": "^16.3.0", "typescript": "~5.4.2" + }, + "engines" : { + "node" : "18.17.1", + "pnpm": "8.15.3" } }