Skip to content

Commit

Permalink
tests should be run on correct image tag and needs to checkout the files
Browse files Browse the repository at this point in the history
  • Loading branch information
danielFlemstrom committed Sep 7, 2024
1 parent 4094ff2 commit 9b288e5
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,31 @@ jobs:
timeout-minutes: 15

steps:

- name: Checkout repository
uses: actions/checkout@v3

- name: Set image_tag variable
run: |
if [[ "${{ needs.build.result }}" == "success" ]]; then
echo "image_tag=${{ github.sha }}" >> $GITHUB_ENV
else
echo "image_tag=latest" >> $GITHUB_ENV
fi
- name: Print image tag
run: |
echo "Candidate Image Tag: ${{ github.sha }}"
echo "Test Using Image Tag: ${{ env.image_tag }}"
- name: Log in to Docker registry
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login harbor.main.rise-ck8s.com -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Pull Docker image
run: |
docker pull harbor.main.rise-ck8s.com/des-public/tutorials:${{ github.sha }}
docker pull harbor.main.rise-ck8s.com/des-public/tutorials:${{ env.image_tag }}
- name: Run notebook tests
run: |
chmod +x ./start_tests.sh
DES_DOCKER_IMAGE="harbor.main.rise-ck8s.com/des-public/tutorials:${{ github.sha }}" ./start_tests.sh
DES_DOCKER_IMAGE="harbor.main.rise-ck8s.com/des-public/tutorials:${{ env.image_tag }}" ./start_tests.sh

0 comments on commit 9b288e5

Please sign in to comment.