Skip to content

test: avoid test host component ID collision #164

test: avoid test host component ID collision

test: avoid test host component ID collision #164

Workflow file for this run

name: build
on:
- push
- workflow_dispatch
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 16.13.2
cache: npm
- run: npm install
lint:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 16.13.2
cache: npm
- run: npm install
- run: npm run lint
verify-api:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 16.13.2
cache: npm
- run: npm install
- run: npm run check-missing-api
test:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 16.13.2
cache: npm
- run: npm install
- run: npm run build:lib
- run: npm run test:ci
- uses: actions/upload-artifact@v3
with:
name: tests-coverage
path: coverage/
if-no-files-found: error
- uses: coverallsapp/github-action@v2
with:
file: ./coverage/ngx-matomo-client/lcov.info
flag-name: ngx-matomo-client
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-npm:
needs: [lint, test, verify-api]
runs-on: ubuntu-latest
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 16.13.2
cache: npm
- run: echo -n "${GPG_SECRET_KEY}" > git_gpg_key.asc
- run: gpg --batch --yes --import git_gpg_key.asc
- run: git config user.name ${GIT_AUTHOR_NAME}
- run: git config user.email ${GIT_AUTHOR_EMAIL}
- run: git config commit.gpgsign true
- run: git config --global user.signingkey ${GPG_KEY_ID}
- run: npm install
- run: npm run build:prod:lib
- uses: actions/upload-artifact@v3
with:
name: dist-prod
path: dist-prod
if-no-files-found: error
- run: npm run semantic-release:ci
env:
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}