Files
SDK-TypeScript/.gitea/workflows/test.yml
Almsss 1b562d2220
All checks were successful
Setup testing environment and test the code / build (push) Successful in 53s
Update .gitea/workflows/test.yml
2026-04-05 12:37:28 +02:00

56 lines
1.2 KiB
YAML

name: Setup testing environment and test the code
on:
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:6.0
redis:
image: redis:7-alpine
api:
image: git.chatenium.hu/chatenium/api:latest
credentials:
username: ${{ secrets.REPO_USER }}
password: ${{ secrets.REPO_TOKEN }}
env:
ENVIRONMENT_TYPE: "testing"
MONGODB_URL: mongodb://mongodb:27017
REDIS_SERVER_ADDR: redis:6379
cdn:
image: git.chatenium.hu/chatenium/cdn:latest
credentials:
username: ${{ secrets.REPO_USER }}
password: ${{ secrets.REPO_TOKEN }}
env:
ENVIRONMENT: "testing"
REDIS_SERVER_ADDR: redis:6379
MAIN_API_URL: http://api:3000
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Create .env file
run: |
echo "API_URL=http://api:3000" >> .env
echo "CDN_URL=http://cdn:4000" >> .env
- name: Run Vitest
run: |
npm install
npm test