diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82b521f..35b6a0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,43 +1,40 @@ -name: ci +name: CI on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: - ci: + build-and-test: runs-on: ubuntu-latest steps: - name: Checkout ๐Ÿ›Ž uses: actions/checkout@v2 - - name: Setup Node.js ๐Ÿ— - uses: actions/setup-node@v2.5.3 + - name: Setup Node.js and Yarn ๐Ÿ— + uses: actions/setup-node@v2 with: node-version: 16 - - name: Get yarn cache directory path ๐Ÿ›  - run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_ENV + - name: Install Yarn ๐Ÿ“ฆ + run: npm install -g yarn - - name: Cache node_modules ๐Ÿ“ฆ - uses: actions/cache@v2 - with: - path: ${{ env.YARN_CACHE_DIR }} - key: ubuntu-latest-yarn-${{ hashFiles('new-web/yarn.lock') }} + - name: Change to new-web directory ๐Ÿ“‚ + run: cd open-etc-pool-friends/new-web - - name: Install dependencies ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป - working-directory: new-web + - name: Install Dependencies ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป run: yarn install - - name: Run linter ๐Ÿ‘€ - working-directory: new-web - run: yarn lint + - name: Lint and Fix โœจ + run: yarn lint-fix + + - name: Build ๐Ÿ— + run: yarn build - - name: Run tests ๐Ÿงช - working-directory: new-web + - name: Test ๐Ÿงช run: yarn test