[pull] master from curlconverter:master #211
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: Node.js CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18" | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npx prettier --check . | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # Tests fail to run on Windows, see | |
| # https://github.com/curlconverter/curlconverter/pull/310 | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node-version: [16, 18, 20] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| - run: npm ci | |
| - run: npm test | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'push' && github.repository_owner == 'curlconverter' | |
| steps: | |
| - name: Deploy demo site | |
| uses: peter-evans/repository-dispatch@v2 | |
| with: | |
| token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
| repository: curlconverter/curlconverter.github.io | |
| event-type: ship-it |