From c6e1a6b6ff23647403ae6b84c64212da3fb5f0ae Mon Sep 17 00:00:00 2001 From: Artem Tyurin Date: Tue, 9 Jul 2024 12:20:26 +0200 Subject: [PATCH] Update CI --- .github/workflows/nodejs.yml | 56 +++++++++++++++----------------- .github/workflows/playwright.yml | 27 --------------- 2 files changed, 27 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/playwright.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 68574c945..6c7009167 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,37 +1,35 @@ name: Node CI - on: push: - branches: - - main + branches: [ main ] pull_request: - branches: - - main - + branches: [ main ] jobs: build: + timeout-minutes: 60 runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm ci - npm run build - npm test - env: - CI: true - - name: Deploy - if: ${{ github.ref == 'refs/heads/main' }} - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./example/dist + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run build + run: npm run build + - name: Run tests + run: npm test + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 + - name: Deploy + if: ${{ github.ref == 'refs/heads/main' }} + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./example/dist diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 467190be6..000000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Playwright Tests -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30