This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
Bump mocha from 10.3.0 to 10.4.0 #172
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: Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 1-31/15 * *' | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_TOKEN }} | |
COHERE_API_TOKEN: ${{ secrets.COHERE_API_TOKEN }} | |
ANTHROPIC_API_TOKEN: ${{ secrets.ANTHROPIC_API_TOKEN }} | |
MISTRAL_API_TOKEN: ${{ secrets.MISTRAL_API_TOKEN }} | |
DOKU_URL: http://127.0.0.1:9044 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x, 20.x, 21.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3.1.0 | |
- name: Setup Doku Stack | |
run: docker-compose up -d | |
- name: Sleep for 30 seconds | |
run: sleep 30 | |
- name: Make API Request and Set DOKU_TOKEN | |
run: | | |
RESPONSE=$(curl -X POST $DOKU_URL/api/keys \ | |
-H 'Authorization: ""' \ | |
-H 'Content-Type: application/json' \ | |
-d '{"Name": "GITHUBACTION"}') | |
MESSAGE=$(echo $RESPONSE | jq -r '.message') | |
echo "DOKU_TOKEN=${MESSAGE}" >> $GITHUB_ENV | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: NPM CI | |
run: npm ci | |
- name: NPM build | |
run: npm run build --if-present | |
- name: NPM Test | |
run: npm test |