From 402f66468b0e521f3718cb0430500d27a089ed52 Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 4 Feb 2024 13:28:12 +0300 Subject: [PATCH] ci-fix --- .gitea/workflows/main.yml | 31 ++++++++++-------------------- .github/workflows/node-ci.yml | 36 +++++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 35df461b..f853a18c 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -1,15 +1,9 @@ name: "deploy" -on: - push: - branches: - - main - - dev - - feature/email-templates - - feature/biome +on: [push] jobs: - test: + Linting: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -18,25 +12,19 @@ jobs: - name: Install dependencies run: npm ci - - name: Run check - run: npm run check + - name: Lint styles + run: npm run lint:styles - - name: Run check types + - name: Check types run: npm run typecheck - quality: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - - name: Install Biome run: npm install --global --save-exact @biomejs/biome - - name: Run Biome + - name: Lint with Biome run: npx biome ci . - tests_e2e: + Playwright: name: Run end-to-end tests runs-on: ubuntu-latest steps: @@ -49,14 +37,15 @@ jobs: - name: Run Playwright Test run: npx playwright test - push: + + Github: needs: test_with_playwright runs-on: ubuntu-latest steps: - name: Push changes uses: ad-m/github-push-action@master - update_mailgun_template: + Mailgun: runs-on: ubuntu-latest name: Update templates on Mailgun if: github.event_name == 'push' && github.ref == 'refs/heads/feature/email-templates' diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 26ba44b4..7fab8ef4 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -3,16 +3,36 @@ name: CI on: [push] jobs: - build: + Linting: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '18' + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 - - name: Install deps + - name: Install dependencies run: npm ci - - name: Check - run: npm run check + - name: Lint styles + run: npm run lint:styles + + - name: Check types + run: npm run typecheck + + - name: Install Biome + run: npm install --global --save-exact @biomejs/biome + + - name: Lint with Biome + run: npx biome ci . + + Playwright: + name: Run end-to-end tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - name: Install dependencies + run: npm ci + - name: Install playwright browsers + run: npx playwright install --with-deps + - name: Run Playwright Test + run: npx playwright test