chore(deps): replace dependency eslint-plugin-node with eslint-plugin… #2220
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: CI | |
on: | |
merge_group: | |
push: | |
jobs: | |
test: | |
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node_version: [16, 18, 19] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v4 | |
with: | |
node_version: ${{ matrix.node_version }} | |
- name: npm build and test | |
run: | | |
npm run clean | |
npm run build | |
npm run jasmine-test | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: end2end tests | |
uses: nick-fields/retry@v3 | |
with: | |
max_attempts: 3 | |
retry_on: error | |
timeout_minutes: 15 | |
command: | | |
npm run clean | |
npm run build | |
npm run end2end-test | |
- name: build image | |
run: | | |
docker build . | |
deploy: | |
needs: [test, docker] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: publish release npm package | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | |
npm run clean | |
npm run build | |
npm publish | |
if: contains( github.ref, 'master' ) || contains( github.base_ref, 'master' ) | |
- name: publish release docker image | |
uses: docker/build-push-action@v5 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: toolisticon/ssl-hostinfo-prometheus-exporter | |
tags: latest | |
if: contains( github.ref, 'master' ) || contains( github.base_ref, 'master' ) | |
- name: publish preview npm package | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | |
PACKAGE_VERSION=$(node -p -e "require('./package.json').version") | |
CURRENT_TIME=$(date +%s) | |
NEW_VERSION=${PACKAGE_VERSION}-build${CURRENT_TIME} | |
npm version $NEW_VERSION --no-git-tag-version | |
npm run clean | |
npm run build | |
npm publish --tag next | |
if: contains( github.ref, 'develop' ) || contains( github.base_ref, 'develop' ) | |
- name: publish preview docker image | |
uses: docker/build-push-action@v5 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: toolisticon/ssl-hostinfo-prometheus-exporter | |
tags: next | |
if: contains( github.ref, 'develop' ) || contains( github.base_ref, 'develop' ) |