feat: #35 feat change to vitest from jest (#37) #89
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: GitHub CI | |
on: | |
push: | |
branches: [ 'main' ] | |
jobs: | |
Test: | |
runs-on: ubuntu-latest | |
services: | |
rabbitmq: | |
image: rabbitmq:3-alpine | |
ports: | |
- 5672:5672 | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
strategy: | |
matrix: | |
node-version: [ 20.x, 'lts/*' ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependencies | |
run: npm install --ignore-scripts | |
- name: Run Unit Tests | |
run: npm run test:ci | |
Release: | |
runs-on: ubuntu-latest | |
needs: [ 'Test' ] | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
- name: NPM Install | |
run: npm install --ignore-scripts | |
- name: Semantic Release (Dry Run) | |
run: npm run semantic-release:dry-run | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Semantic Release | |
run: npm run semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |