feat: modernize CI workflows and README badges, regenerate yarn.lock #10
This file contains hidden or 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: CI | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ^20 | |
| - name: Configure yarn registry | |
| run: yarn config set registry https://registry.npmjs.org | |
| - name: Install Dependency | |
| run: yarn install | |
| - name: Run Lint | |
| run: yarn run lint | |
| coverage: | |
| needs: [lint] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ^20 | |
| - name: Configure yarn registry | |
| run: yarn config set registry https://registry.npmjs.org | |
| - name: Install Dependency | |
| run: yarn install | |
| - name: Run Coverage | |
| run: yarn run coverage | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@master | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| test: | |
| needs: [lint] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [^18, ^20] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Configure yarn registry | |
| run: yarn config set registry https://registry.npmjs.org | |
| - name: Install Dependency | |
| run: yarn install | |
| - name: Run Unit test | |
| run: yarn run test | |
| - name: Run Build | |
| run: yarn run build |