Skip to content

Commit

Permalink
No more set_output, write screenshots to playwright-report, upload re…
Browse files Browse the repository at this point in the history
…port, fix release
  • Loading branch information
vanpelt committed Jun 22, 2024
1 parent 0e6386f commit ad54c73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
run: pnpm exec playwright install --with-deps chromium webkit
- name: Get short SHA
id: get_short_sha
run: echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Run Playwright tests
env:
DOCKER_TAG: sha-${{ steps.get_short_sha.outputs.short_sha }}
Expand All @@ -170,21 +170,8 @@ jobs:
if: always()
with:
name: playwright-report
path: ./frontend/test-results/
path: ./frontend/playwright-report/
retention-days: 30
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag latest image
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/openui-v2'
env:
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
run: |
docker tag ${{ env.IMAGE }}:sha-${{ steps.get_short_sha.outputs.short_sha }} ${{ env.IMAGE }}:latest
docker push ${{ env.IMAGE }}:latest

release:
needs: test
Expand All @@ -201,13 +188,13 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get short SHA
- name: Convert full SHA to short SHA
id: get_short_sha
run: echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
run: echo "short_sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
- name: Tag latest image
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/openui-v2'
env:
IMAGE: ghcr.io/${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
run: |
docker tag ${{ env.IMAGE }}:sha-${{ steps.get_short_sha.outputs.short_sha }} ${{ env.IMAGE }}:latest
docker push ${{ env.IMAGE }}:latest
4 changes: 3 additions & 1 deletion frontend/integration_tests/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ test('test good flow', async ({ page }) => {
/.*unsplash\.com.*/
)
const annotator = await page.$('#version-0')
await annotator?.screenshot({ path: 'annotator-screenshot.png' })
await annotator?.screenshot({
path: 'playwright-report/annotator-screenshot.png'
})
})

0 comments on commit ad54c73

Please sign in to comment.