chore(ci): add github reporter #22
This file contains 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
on: | |
pull_request: | |
workflow_dispatch: | |
name: test | |
jobs: | |
eslint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: "https://registry.npmjs.org" | |
- run: npm ci | |
- run: npm run lint | |
test: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
permissions: | |
packages: read | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to GitHub Container registry | |
uses: docker/login-action@v1 | |
env: | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
registry: ghcr.io | |
username: $GITHUB_USER | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: start container | |
run: docker -vvv pull ghcr.io/shopware/shopware/ci-e2e:trunk | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 7 |