Merge pull request #642 from embroider-build/renamed-modules-support #1056
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node CI | |
on: | |
push: | |
branches: | |
- main | |
- 'v*' # prior release branches (e.g. `v0.30.x` branch) | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
discover_matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: volta-cli/action@v4 | |
with: | |
node-version: '16' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm install | |
- name: eslint | |
run: for name in `ls packages/*/.eslintrc.js`; do dirname $name; done | xargs npx eslint -- | |
- id: set-matrix | |
working-directory: test-scenarios | |
run: | | |
matrix_json=$(node --require ts-node/register ./suite-setup-util.ts) | |
echo "matrix=$matrix_json" >> $GITHUB_OUTPUT | |
scenarios: | |
needs: discover_matrix | |
name: ${{ matrix.name }} | |
runs-on: '${{ matrix.os }}-latest' | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.discover_matrix.outputs.matrix)}} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: volta-cli/action@v4 | |
with: | |
node-version: '16' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm install --no-package-lock | |
- name: test | |
run: ${{ matrix.command }} | |
working-directory: test-scenarios | |
unit: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: volta-cli/action@v4 | |
with: | |
node-version: '16' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm install | |
- name: test | |
run: npm run test:node | |
working-directory: packages/ember-auto-import |