Skip to content

update envs

update envs #7

name: Test and Dockerize
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 16.11.1
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: "5.0.7"
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: latest
- name: Run tests
run: npm run test:detectOpen
env:
NODE_ENV: development
MONGO_URI: mongodb+srv://mirzabicerdev:<PASSWORD>@cluster0.y5wdfov.mongodb.net/?retryWrites=true&w=majority
MONGO_PASSWORD: OsTa2012
API_VERSION: 0.0.1
PORT: 8371
REDIS_HOST: redis-17118.c311.eu-central-1-1.ec2.cloud.redislabs.com
REDIS_PORT: 17118
REDIS_PASSWORD: QO3oRAIuvXVtbuMan6zYNjichHZUWQ6C
JWT_SECRET: ijoiesfkwjowiejioJEWROGFKJRWEIOFG
ACCESS_EXP_MIN: 99999
dockerize:
needs: test
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: mirzabicer/programming-project:latest