From c515b872be5835f1eaecdf229f3cfab4ffefe650 Mon Sep 17 00:00:00 2001 From: Emerson Laurentino Date: Fri, 13 May 2022 15:12:51 -0300 Subject: [PATCH] fix: gh action ci --- .github/workflows/ci.yml | 73 ++++++++++++---------------------------- 1 file changed, 21 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 095e28f280..54355af1c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,69 +2,38 @@ name: CI on: - workflow_dispatch: push: - branches-ignore: - - main - - master + branches: ['main'] + pull_request: + types: [opened, synchronize] jobs: - lint: - name: Lint + build: + name: Build and Test + timeout-minutes: 15 runs-on: ubuntu-latest + # To use Remote Caching, uncomment the next lines and follow the steps below. + # env: + # TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + # TURBO_TEAM: ${{ secrets.TURBO_TEAM }} steps: - - name: Checkout repo + - name: Check out code uses: actions/checkout@v2 - - - name: Use Node 14.x - uses: actions/setup-node@v1 with: - node-version: '14.x' - - - name: Install deps and build (with cache) - uses: bahmutov/npm-install@v1 - - - name: Lint - run: yarn lint - - test: - name: Test - runs-on: ubuntu-latest + fetch-depth: 2 - steps: - - name: Checkout repo - uses: actions/checkout@v2 - - - name: Use Node 14.x - uses: actions/setup-node@v1 + - name: Setup Node.js environment + uses: actions/setup-node@v2 with: - node-version: '14.x' + node-version: 16 + cache: 'yarn' - - name: Install deps and build (with cache) - uses: bahmutov/npm-install@v1 - - - name: Test - run: yarn test --ci --maxWorkers=2 - - size: - name: Size Limit - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v2 - - - name: Use Node 14.x - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - - name: Install deps and build (with cache) - uses: bahmutov/npm-install@v1 + - name: Install dependencies + run: yarn - name: Build - run: yarn build --scope "@vtex/gatsby-plugin-thumbor" --scope "@faststore/ui" --scope "@faststore/sdk" --ci + run: yarn build - - name: Size Limit - run: yarn size + - name: Test + run: yarn test