From 1b6efa249eac49e4415777a2cdcc5da30be2bd9b Mon Sep 17 00:00:00 2001 From: Danil Kostromin Date: Tue, 16 Jan 2024 18:46:02 +0200 Subject: [PATCH] ci(release,ci): fix formatting and pass env through global config Changes: \n - Fix indentation in CI config \n - Disable playwright browser install trough global env config --- .github/workflows/ci.yml | 74 +++++++++------------- .github/workflows/create-release-build.yml | 8 ++- 2 files changed, 34 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39e6eaad..f8e69516 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,45 +1,29 @@ - name: CI - on: - pull_request: - branches: [main] - jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20] - steps: - - name: Code Checkout - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - name: Install dependencies - run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install - - name: Code Testing - run: pnpm run test - lint: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20] - steps: - - name: Code Checkout - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - name: Install dependencies - run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install - - name: Code Linting - run: pnpm run lint +name: CI +on: + pull_request: + branches: [main] +env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + steps: + - name: Code Checkout + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Code Linting + run: pnpm run lint + - name: Code Testing + run: pnpm run test diff --git a/.github/workflows/create-release-build.yml b/.github/workflows/create-release-build.yml index 91ad70cd..092f39d2 100644 --- a/.github/workflows/create-release-build.yml +++ b/.github/workflows/create-release-build.yml @@ -19,6 +19,8 @@ on: type: boolean description: Dry release default: false +env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 jobs: test: runs-on: ubuntu-latest @@ -37,7 +39,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies - run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install + run: pnpm install - name: Code Testing run: pnpm run test lint: @@ -57,7 +59,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies - run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install + run: pnpm install - name: Code Linting run: pnpm run lint release: @@ -83,7 +85,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies - run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm install + run: pnpm install - name: Create release run: pnpm run release --ci --verbose $TYPE_ARG $BETA_ARG $DRY_ARG env: