Skip to content

feat: add Currency field to ProductItem model and update related tests #798

feat: add Currency field to ProductItem model and update related tests

feat: add Currency field to ProductItem model and update related tests #798

Workflow file for this run

name: ci
on: [push, pull_request]
env:
go-version: '1.24'
jobs:
test:
name: Test
runs-on: ubuntu-latest
container:
image: golang:1.24-trixie
services:
redis:
image: redis:5.0.14-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mongo:
image: mongo:5.0.8
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: weni-web-chat
options: >-
--health-cmd "mongosh --eval 'db.adminCommand({ ping: 1 })'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint gofmt
run: gofmt -d .
- name: Run tests
env:
REDIS_HOST: redis
MONGO_HOST: mongo
WWC_S3_ACCESS_KEY: ${{ secrets.WWC_S3_ACCESS_KEY }}
WWC_S3_SECRET_KEY: ${{ secrets.WWC_S3_SECRET_KEY }}
WWC_S3_ENDPOINT: ${{ secrets.WWC_S3_ENDPOINT }}
WWC_S3_REGION: ${{ secrets.WWC_S3_REGION }}
WWC_S3_BUCKET: ${{ secrets.WWC_S3_BUCKET }}
run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false