Update README.md #389
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: | |
- main | |
- backend | |
pull_request: | |
branches: | |
- main | |
- backend | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: production-whole-letisha/is-proyecto | |
env: | |
# Define las variables de entorno específicas para este flujo de trabajo | |
PG_USER: ${{ vars.PG_USER }} | |
PG_PASSWORD: ${{ vars.PG_PASSWORD }} | |
PG_RDS_HOST: ${{ vars.PG_RDS_HOST }} | |
PG_RDS_PORT: ${{ vars.PG_RDS_PORT }} | |
API_SECRET: ${{ vars.API_SECRET }} | |
TOKEN_HOUR_LIFESPAN: ${{ vars.TOKEN_HOUR_LIFESPAN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.19' | |
- name: Build | |
run: cd backend && go build | |
- name: Print Secret Key | |
run: echo Secret Key = ${{ vars.PG_USER }} | |
- name: Test | |
run: | | |
cd backend/tests | |
PG_USER=$PG_USER PG_PASSWORD=$PG_PASSWORD PG_RDS_HOST=$PG_RDS_HOST PG_RDS_PORT=$PG_RDS_PORT go test | |