From 9762cd67bd67232827db5c26d786bb462bf4a2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Niemel=C3=A4?= Date: Sun, 18 Aug 2024 13:38:27 +0200 Subject: [PATCH] Added CI workflow --- .github/workflows/frontend-ci.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/frontend-ci.yml diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml new file mode 100644 index 0000000..3376736 --- /dev/null +++ b/.github/workflows/frontend-ci.yml @@ -0,0 +1,34 @@ +name: Frontend CI + +on: + push: + paths: + - "frontend/**" + + +jobs: + prettier: + name: Code quality check + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + cache-dependency-path: ./frontend/package-lock.json + + - name: Clean install + working-directory: ./frontend + run: npm ci + + - name: Prettier & Eslint + working-directory: ./frontend + run: npm run lint + + - name: Svelte check + working-directory: ./frontend + run: npm run check