Skip to content

Remove waitPort call from wait-port.js (#105) #40

Remove waitPort call from wait-port.js (#105)

Remove waitPort call from wait-port.js (#105) #40

# The 'release-please' workflow is used to create the 'Release Please' pull
# request. This PR is opened when we have a new commit to main.
# See:
# https://github.com/googleapis/release-please
name: CI main
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm test
- name: Report coverage
run: npm run report-coverage
- name: Store coverage artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
./artifacts/**/*.*
release-please:
runs-on: ubuntu-latest
needs: 'test'
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: wait-port
# If the 'release please' action has been performed, we can actually
# deploy the website.
# Note: *every* step here needs to check the 'release_created' flag.
- name: Checkout
uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
# Setup the right version of Node.js.
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '*'
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- name: Install dependencies
run: npm ci
if: ${{ steps.release.outputs.release_created }}
# Fixup Git URLs, see:
# https://stackoverflow.com/questions/70663523/the-unauthenticated-git-protocol-on-port-9418-is-no-longer-supported
- name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}