added port number to github secrets #4
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: Git flow CI | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| - 'feature/*' | |
| - 'release/*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run the tests with coverage | |
| env: | |
| DJANGO_SETTINGS_MODULE: "Videogames_project.settings" | |
| DB_NAME: ${{ secrets.DB_NAME }} | |
| DB_USER: ${{ secrets.DB_USER }} | |
| DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
| DB_HOST: ${{ secrets.DB_HOST }} | |
| DB_PORT: ${{ secrets.DB_PORT }} | |
| run: | | |
| coverage run -m pytest -v -s | |
| - name: Generate Coverage Report | |
| run: | | |
| coverage report -m | |
| release: | |
| name: Create Release Tag | |
| if: github.ref == 'refs/heads/release/*' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v4 | |
| - name: Create the release tag | |
| env: | |
| GIT_TAG: "v$(date +'%Y.%m.%d.%H%M')" | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag $GIT_TAG | |
| git push origin $GIT_TAG |