fix #464
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: babel-loader | |
on: [push, pull_request] | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: latest | |
- name: Install dependencies | |
run: yarn | |
- name: Lint | |
run: yarn run lint | |
test: | |
name: Test - ${{ matrix.os }} - Node ${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
node-version: [14, 16, 18] | |
webpack-version: ['5'] | |
include: | |
- node-version: "14.15.0" # The minimum supported node version | |
webpack-version: latest | |
os: ubuntu-latest | |
- node-version: latest | |
webpack-version: latest | |
os: ubuntu-latest | |
coverage: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn | |
- name: Install webpack ${{ matrix.webpack-version }} | |
run: yarn add -D webpack@${{ matrix.webpack-version }} | |
- name: Build babel-loader | |
run: yarn run build | |
env: | |
BABEL_ENV: test | |
- name: Run tests for webpack version ${{ matrix.webpack-version }} | |
run: yarn test-only | |
- name: Submit coverage data to codecov | |
uses: codecov/codecov-action@v1 | |
if: ${{ matrix.coverage }} | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |