fix: Atributo errado no objeto RefreshToken #13
This file contains hidden or 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: CI/CD Pipeline | |
| on: [push, pull_request] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./backend | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }} | |
| JWT_EXPIRATION_TIME: ${{ secrets.JWT_EXPIRATION_TIME }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Instalação Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Instalação Poetry | |
| run: pipx install poetry | |
| - name: Instalação das dependências | |
| run: poetry install | |
| - name: Testes | |
| run: poetry run pytest -s -v | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Preparar pasta de deploy | |
| run: | | |
| mkdir deploy | |
| cp backend/poetry.lock deploy/ | |
| cp backend/pyproject.toml deploy/ | |
| cp -r backend/src deploy/ | |
| ls -la deploy/ | |
| - name: Deploy | |
| uses: squarecloudofc/github-action@v2.0.1 | |
| with: | |
| command: commit ${{ secrets.SQUARE_APPLICATION_ID }} --restart | |
| token: '${{ secrets.SQUARE_TOKEN }}' | |
| workdir: deploy |