Skip to content

update deps and fix test #98

update deps and fix test

update deps and fix test #98

Workflow file for this run

name: CI/CD
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.14.0'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Run Jest tests
env:
TEST_TELEGRAM_TOKEN: ${{ secrets.TEST_TELEGRAM_TOKEN }}
TEST_USER_ID: ${{ secrets.TEST_USER_ID }}
TEST_GROUP_ID: ${{ secrets.TEST_GROUP_ID }}
TEST_GROUP_MEMBER_ID: ${{ secrets.TEST_GROUP_MEMBER_ID }}
TEST_CHANNEL_ID: ${{ secrets.TEST_CHANNEL_ID }}
run: npm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true
- name: Lint code
run: npm run lint
- name: Check formatting
run: npm run format:check
- name: Build
run: npm run build
- name: Publish to npm
if: ${{ github.ref == 'refs/heads/main' && success() }}
run: npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}