Skip to content

Commit

Permalink
build: Add timeout for Unit-Tests job and checkout code with tag in C…
Browse files Browse the repository at this point in the history
…ontinuous-Deployment job
  • Loading branch information
jjjermiah committed Apr 1, 2024
1 parent dc4bbd7 commit 2f85826
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
jobs:
Unit-Tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 10 # Consider increasing timeout
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14]
Expand Down Expand Up @@ -101,7 +102,7 @@ jobs:
needs: [Unit-Tests]

# if pulling to main, deploy to PyPI
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'

# Set up operating system
runs-on: ubuntu-latest
Expand Down Expand Up @@ -140,8 +141,10 @@ jobs:
if: needs.Continuous-Deployment.outputs.released == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout the code with tag ${{ needs.Continuous-Deployment.outputs.tag }}
uses: actions/checkout@v3
with:
ref: ${{ needs.Continuous-Deployment.outputs.tag }}

- name: Set up Python 3.12
uses: actions/setup-python@v4
Expand Down Expand Up @@ -170,24 +173,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ needs.Continuous-Deployment.outputs.tag }}

- name: Set up QEMU
if: steps.release.outputs.released == 'true'
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
if: steps.release.outputs.released == 'true'
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
if: steps.release.outputs.released == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to the GitHub Container Registry
if: steps.release.outputs.released == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand Down

0 comments on commit 2f85826

Please sign in to comment.