Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
chore: Ci enhancement (#193)
Browse files Browse the repository at this point in the history
* cache yarn and have lint and build as separate steps

* add back yarn.lock

* add jobs

* fix name
  • Loading branch information
Tbaut authored and mpetrunic committed Dec 15, 2022
1 parent ccbfacf commit 4091d9e
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- '**'

jobs:
checks:
name: Checks
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -23,24 +23,47 @@ 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
if: always()
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
Expand All @@ -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
Expand Down

0 comments on commit 4091d9e

Please sign in to comment.