Workflow file for this run
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: miza-kinesis - build and publish | |
on: [push, create] | |
env: | |
NODE_VERSION: "18" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- "14" | |
- "16" | |
- "18" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
registry-url: "https://registry.npmjs.org" | |
cache: 'npm' | |
- name: update npm to v8 | |
run: npm -g install npm@8 | |
- name: Setup Kinesis | |
uses: zhulik/setup-kinesis@v1 | |
- name: Install dependencies and test | |
run: npm ci | |
- name: Linters | |
run: npm run lint | |
- name: Tests | |
run: npm run test | |
- name: Prepare for integration tests | |
run: bash scripts/configure-aws-services.sh | |
env: | |
AWS_ACCESS_KEY_ID: test | |
AWS_SECRET_ACCESS_KEY: test | |
- name: Run integration tests to kinesis | |
run: npm run test:integration | |
env: | |
AWS_ACCESS_KEY_ID: test | |
AWS_SECRET_ACCESS_KEY: test | |
release: | |
needs: test | |
if: contains(github.ref, 'tags') && github.event_name == 'create' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: "https://registry.npmjs.org" | |
- name: Build npm package | |
run: npm run build | |
- name: Publish to npm | |
run: npm publish --access public | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_USER_ACCESS_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_USER_ACCESS_TOKEN }} |