diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef6d9a74..a839cbc8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,8 +10,8 @@ on: - '**' jobs: - checks: - name: Checks + tests: + name: Tests runs-on: ubuntu-latest strategy: fail-fast: false @@ -23,12 +23,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: "16" + cache: 'yarn' - name: Install - run: yarn install --frozen-lockfile - - name: Build - run: yarn run build - - name: Lint - run: yarn run lint + run: yarn --prefer-offline --frozen-lockfile - name: Tests run: 'xvfb-run --auto-servernum yarn run test:${{matrix.automation}}:${{ matrix.mm-version }} --timeout 50000' - uses: actions/upload-artifact@v3 @@ -36,11 +33,37 @@ jobs: with: name: debug_screenshots path: ./*.png + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "16" + cache: 'yarn' + - name: Install deps + run: yarn --prefer-offline --frozen-lockfile + - name: Lint + run: yarn run lint + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "16" + cache: 'yarn' + - name: Install deps + run: yarn --prefer-offline --frozen-lockfile + - name: Build + run: yarn build maybe-release: name: release runs-on: ubuntu-latest - needs: [checks] + needs: [tests, lint, build] if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - uses: google-github-actions/release-please-action@v3 # it will analyze commits and create PR with new version and updated CHANGELOG:md file. On merging it will create github release page with changelog @@ -60,7 +83,7 @@ jobs: registry-url: 'https://registry.npmjs.org' if: ${{ steps.release.outputs.release_created }} - - run: yarn install --frozen-lockfile + - run: yarn --prefer-offline --frozen-lockfile if: ${{ steps.release.outputs.release_created }} - run: yarn build