name: Run tests on: push: branches: [main] pull_request: types: [opened, synchronize] concurrency: group: test-${{ github.ref }} cancel-in-progress: true jobs: test: runs-on: ubuntu-latest strategy: matrix: node: ['18', '20', '22'] include: - node: '20' coverage: true name: Test with Node ${{ matrix.node }} steps: - uses: actions/checkout@v2 - name: Setup node uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} - run: yarn install --frozen-lockfile --check-files - run: yarn typecheck - run: | git config --global user.email "tester@expo.dev" git config --global user.name "Test" - run: yarn test if: ${{ !matrix.coverage }} env: NODE_OPTIONS: --max-old-space-size=8192 - run: yarn test --coverage if: ${{ matrix.coverage }} env: # Oclif seems to cause OOM errors when testing with coverage enabled. # Remove this whenever we solved those OOM errors. NODE_OPTIONS: --max-old-space-size=8192 - run: yarn lint --max-warnings=0 - run: yarn install --frozen-lockfile --check-files working-directory: ./scripts - uses: codecov/codecov-action@v1 if: ${{ matrix.coverage }} with: token: ${{ secrets.CODECOV_TOKEN }} - run: yarn lint-changelog notify-slack: runs-on: ubuntu-latest needs: [test] name: Notify Slack if: ${{ github.ref == 'refs/heads/main' && always() }} steps: - uses: actions/checkout@v2 - name: Notify Slack uses: ./.github/internal-actions/notify-slack-on-fail-or-recover with: channel: eas-cli slack_webhook: ${{ secrets.SLACK_WEBHOOK }}