Forum Discussion
felipecferraz
2 years agoNew Contributor
Hello guys, finally I had success on all pipeline!
Here is my yml file for reference!
Actually, just the last four lines is the entire solution, but I posting the entire document for reference
name: "e2e"
on: [push]
jobs:
test-e2e:
name: Run E2E tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run your tests
run: npx playwright test
- name: Upload allure report results
if: always()
uses: actions/upload-artifact@v2
with:
name: Allure Report
path: test-results
- name: Upload JUnit artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: junit-artifact
path: playwright-report
- name: Download Artifact
if: always()
uses: actions/download-artifact@v2
with:
name: junit-artifact
path: download-artifact
- name: Get File Info
id: file
if: always()
run: |
relative_path="download-artifact/results.xml"
absolute_path="${{ github.workspace }}/$relative_path"
echo "Absolute path of the downloaded file: $absolute_path"
file_size=$(stat -c%s "$absolute_path")
echo "::set-output name=path::$absolute_path"
echo "Size of the downloaded file: $file_size"
- name: upload to Zephyr via curl
if: always()
run: >-
curl --location --request POST '${{ vars.ZEPHYR_BASE_URL }}/automations/executions/junit?autoCreateTestCases=true&projectKey=${{ vars.ZEPHYR_PROJECT_KEY }}' --header 'Authorization: Bearer ${{ secrets.ZEPHYR_TOKEN }}' --form 'file=@"${{ steps.file.outputs.path }}"'
Related Content
- 2 years ago
- 3 years ago
- 4 years ago
- 6 years ago
Recent Discussions
- 7 days ago