Skip to content

Commit

Permalink
fix: gh action ci
Browse files Browse the repository at this point in the history
  • Loading branch information
emersonlaurentino committed May 13, 2022
1 parent a726e1f commit c515b87
Showing 1 changed file with 21 additions and 52 deletions.
73 changes: 21 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c515b87

Please sign in to comment.