Files
expo-cli/.github/workflows/test.yml
Cedric van Putten 0a11ffafd7 fix: resolve remaining CI issues (#4798)
* fix(webpack-config): add missing `@types/babel__code-frame`

* fix(xdl): remove typescript references and use dependencies instead

* fix(xdl): add missing `@types/lodash`

* fix(expo-cli): add missing `node-fetch` and `@types/node-fetch`

* fix(expo-cli): add `@ts-expect-error` for `@expo/package-manager` spinner option

* chore: update lockfile

* refactor(expo-cli): make spawn failures in `eject-test.ts` visible

* refactor(expo-cli): add `npm install` fallback to `yarn install`

* chore: disable caching `node_modules` in test workflow

* refactor: simplify the ci build pipeline and avoid caching node modules

* refactor: finalize new working workflows
2023-12-22 16:57:28 +01:00

100 lines
3.0 KiB
YAML

name: Test Packages
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16']
name: Lint with Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: yarn install --frozen-lockfile --check-files
- run: yarn lint --max-warnings=0
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['16']
package:
[
dev-tools,
babel-preset-cli,
expo-cli,
expo-codemod,
pwa,
# webpack-config,
xdl,
]
name: Test ${{ matrix.package }} on Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install packages
run: yarn install --frozen-lockfile --check-files
- name: Build packages
run: yarn lerna run prepare --stream
- name: Test ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: yarn test
# run: cd packages/${{ matrix.package }} && yarn test --coverage
env:
CI: true
EXPO_DEBUG: true
# - name: Get Test Flag Name
# id: cov-flag-name
# run: echo "::set-output name=flag::$(echo ${{ matrix.package }} | perl -pe 's/[^a-z]+([a-z])/\U\1/gi;s/^([A-Z])/\l\1/')"
# - uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# file: ./packages/${{ matrix.package }}/coverage/clover.xml # optional
# flags: ${{ steps.cov-flag-name.outputs.flag }} # optional
# fail_ci_if_error: false # optional (default = false)
# puppeteer:
# runs-on: ubuntu-latest
# needs: build
# strategy:
# fail-fast: false
# name: Expo Webpack
# steps:
# - uses: actions/cache@v2
# with:
# path: '*'
# key: v2-${{ github.sha }}-${{ matrix.node }}
# - name: Install puppeteer
# working-directory: packages/webpack-config
# run: yarn add -D [email protected]
# - name: Install test project dependencies
# working-directory: packages/webpack-config/e2e/basic
# run: yarn
# # Test starting an Expo web project
# - name: Test starting Webpack
# working-directory: packages/webpack-config
# run: yarn test:e2e:start
# env:
# CI: true
# # Test building an Expo web project
# - name: Test building Webpack
# working-directory: packages/webpack-config
# run: yarn test:e2e:build
# env:
# CI: true