Skip to content

Commit

Permalink
fix: game action button layout on mobile
Browse files Browse the repository at this point in the history
Includes better e2e tests and coverage reporting

Closes #625
  • Loading branch information
andrew-codes committed Nov 26, 2024
1 parent 632031e commit 316495d
Show file tree
Hide file tree
Showing 283 changed files with 4,714 additions and 1,076 deletions.
25 changes: 0 additions & 25 deletions .devcontainer/manually-start-services-for-e2e.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/close-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Prune PR images
run: yarn nx run-many --target=package/prune --verbose
run: yarn nx run-many --target=package --configuration=prune --verbose
env:
DEBUG: 'playnite-web/*'
GITHUB_TOKEN: ${{ secrets.PKG_DELETE_TOKEN }}
Expand Down
55 changes: 16 additions & 39 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install deps
run: yarn
- name: Run all unit tests
run: yarn nx run-many --target=test/unit/ci --parallel --verbose --projects=tag:linux
run: yarn nx run-many --target=test/unit --configuration=ci --parallel --verbose --projects=tag:linux
- uses: codecov/codecov-action@v4
if: always()
with:
Expand Down Expand Up @@ -58,29 +58,17 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all component tests
run: yarn nx run-many --target=test/components/ci --parallel --verbose --projects=tag:linux
run: yarn nx run-many --target=test/components --configuration=ci --parallel --verbose --projects=tag:linux
- name: Upload visual regression artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: visual-regression-comparisons
path: apps/playnite-web/visual-regression-tests/screenshots
- name: Upload test video artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: component-cypress-videos
path: apps/playnite-web/cypress/videos
- name: Upload test screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: component-cypress-screenshots
path: apps/playnite-web/cypress/screenshots
name: component-visual-regression
path: apps/playnite-web/visual-regression-tests
- uses: codecov/codecov-action@v4
if: always()
with:
files: '**/.test-runs/component/lcov.info'
files: '**/.test-runs/**/lcov.info'
flags: component-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -125,14 +113,8 @@ jobs:
run: yarn nx run-many --target=version --exclude='*,!tag:linux'
env:
NODE_ENV: production
- name: Package projects
run: yarn nx run-many --target=package --parallel --verbose --exclude '*,!tag:linux'
env:
NODE_ENV: production
DEBUG: 'playnite-web/*'
PLATFORM: linux/amd64,linux/arm64
- name: Run all e2e tests
run: yarn nx run-many --target=test/e2e/ci --verbose --projects=tag:linux
run: yarn nx run-many --target=test/e2e --configuration=ci --verbose --projects=tag:linux
env:
NODE_ENV: production
DEBUG: 'playnite-web/*'
Expand All @@ -141,20 +123,15 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: visual-regression-e2e-comparisons
path: apps/playnite-web/visual-regression-tests/screenshots
- name: Upload test video artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: e2e-cypress-videos
path: apps/playnite-web/cypress/videos
- name: Upload test screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
name: e2e-visual-regression
path: apps/playnite-web/visual-regression-tests
- uses: codecov/codecov-action@v4
if: always()
with:
name: e2e-cypress-screenshots
path: apps/playnite-web/cypress/screenshots
files: '**/.test-runs/**/lcov.info'
flags: e2e-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

unit_tests_windows:
name: Verify PR - Tests (Windows)
Expand Down Expand Up @@ -183,7 +160,7 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --parallel --verbose --projects=tag:windows
run: yarn nx run-many --target=test/unit --configuration=ci --parallel --verbose --projects=tag:windows

package_windows:
name: Package Windows projects
Expand Down Expand Up @@ -229,7 +206,7 @@ jobs:
NODE_ENV: production
VERSION: '${{ steps.nextVersion.outputs.value }}'
- name: Package projects
run: yarn nx run-many --target=package --exclude='*,!tag:windows'
run: yarn nx run-many --target=package --configuration=production --exclude='*,!tag:windows'
env:
NODE_ENV: production
VERSION: '${{ steps.nextVersion.outputs.value }}'
Expand Down
53 changes: 17 additions & 36 deletions .github/workflows/pull-request-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install deps
run: yarn
- name: Run all unit tests
run: yarn nx run-many --target=test/unit/ci --parallel --verbose --exclude='*,!tag:linux'
run: yarn nx run-many --target=test/unit --configuration=ci --parallel --verbose --exclude='*,!tag:linux'
- uses: codecov/codecov-action@v4
if: always()
with:
Expand Down Expand Up @@ -65,38 +65,24 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all component tests
run: yarn nx run-many --target=test/components/ci --verbose --exclude='*,!tag:linux'
run: yarn nx run-many --target=test/components --configuration=ci --verbose --exclude='*,!tag:linux'
- name: Upload visual regression artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: visual-regression-component-comparisons
path: apps/playnite-web/visual-regression-tests/screenshots
- name: Upload test video artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: component-cypress-videos
path: apps/playnite-web/cypress/videos
- name: Upload test screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: component-cypress-screenshots
path: apps/playnite-web/cypress/screenshots
name: component-visual-regression
path: apps/playnite-web/visual-regression-tests
- uses: codecov/codecov-action@v4
if: always()
with:
files: '**/.test-runs/component/lcov.info'
files: '**/.test-runs/**/lcov.info'
flags: component-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

e2e_tests_linux:
name: Verify PR - e2e Tests (Linux)
runs-on: ubuntu-latest
needs:
- package_linux
env:
REGISTRY: ghcr.io
OWNER: andrew-codes
Expand All @@ -120,28 +106,23 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all e2e tests
run: yarn run test/e2e/ci
run: yarn nx run-many --target=test/e2e --configuration=ci --verbose --exclude='*,!tag:linux'
env:
NODE_ENV: production
DEBUG: 'playnite-web/*'
- name: Upload visual regression artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: visual-regression-e2e-comparisons
path: apps/playnite-web/visual-regression-tests/screenshots
- name: Upload test video artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: e2e-cypress-videos
path: apps/playnite-web/cypress/videos
- name: Upload test screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
name: e2e-visual-regression
path: apps/playnite-web/visual-regression-tests
- uses: codecov/codecov-action@v4
if: always()
with:
name: e2e-cypress-screenshots
path: apps/playnite-web/cypress/screenshots
files: '**/.test-runs/**/lcov.info'
flags: e2e-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

package_linux:
name: Package non-Windows projects
Expand Down Expand Up @@ -186,7 +167,7 @@ jobs:
env:
NODE_ENV: production
- name: Package projects
run: yarn nx run-many --target=package --verbose --exclude='*,!tag:linux'
run: yarn nx run-many --target=package --configuration=production --verbose --exclude='*,!tag:linux'
env:
NODE_ENV: production
DEBUG: 'playnite-web/*'
Expand Down Expand Up @@ -221,7 +202,7 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --parallel --verbose --exclude='*,!tag:windows'
run: yarn nx run-many --target=test/unit --configuration=ci --parallel --verbose --exclude='*,!tag:windows'

package_windows:
name: Package Windows projects
Expand Down Expand Up @@ -263,7 +244,7 @@ jobs:
env:
NODE_ENV: production
- name: Package projects
run: yarn nx run-many --target=package --parallel --verbose --exclude='*,!tag:windows'
run: yarn nx run-many --target=package --configuration=production --parallel --verbose --exclude='*,!tag:windows'
env:
NODE_ENV: production
- name: Upload artifacts
Expand Down
53 changes: 17 additions & 36 deletions .github/workflows/verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Install deps
run: yarn
- name: Run all unit tests
run: yarn nx run-many --target=test/unit/ci --parallel --verbose --projects=tag:linux
run: yarn nx run-many --target=test/unit --configuration=ci --parallel --verbose --projects=tag:linux
- uses: codecov/codecov-action@v4
if: always()
with:
Expand Down Expand Up @@ -95,38 +95,24 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all component tests
run: yarn nx run-many --target=test/components/ci --parallel --verbose --projects=tag:linux
run: yarn nx run-many --target=test/components --configuration=ci --parallel --verbose --projects=tag:linux
- name: Upload visual regression artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: visual-regression-component-comparisons
path: apps/playnite-web/visual-regression-tests/screenshots
- name: Upload test video artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: component-cypress-videos
path: apps/playnite-web/cypress/videos
- name: Upload test screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: component-cypress-screenshots
path: apps/playnite-web/cypress/screenshots
name: component-visual-regression
path: apps/playnite-web/visual-regression-tests
- uses: codecov/codecov-action@v4
if: always()
with:
files: '**/.test-runs/component/lcov.info'
files: '**/.test-runs/**/lcov.info'
flags: component-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

e2e_tests_linux:
name: Verify PR - e2e Tests (Linux)
runs-on: ubuntu-latest
needs:
- package_linux
env:
REGISTRY: ghcr.io
OWNER: andrew-codes
Expand All @@ -150,28 +136,23 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all e2e tests
run: yarn nx run-many --target=test/e2e/ci --verbose --projects=tag:linux
run: yarn nx run-many --target=test/e2e --configuration-ci --verbose --projects=tag:linux
env:
NODE_ENV: production
DEBUG: 'playnite-web/*'
- name: Upload visual regression artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: visual-regression-e2e-comparisons
path: apps/playnite-web/visual-regression-tests/screenshots
- name: Upload test video artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: e2e-cypress-videos
path: apps/playnite-web/cypress/videos
- name: Upload test screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
name: e2e-visual-regression
path: apps/playnite-web/visual-regression-tests
- uses: codecov/codecov-action@v4
if: always()
with:
name: e2e-cypress-screenshots
path: apps/playnite-web/cypress/screenshots
files: '**/.test-runs/**/lcov.info'
flags: e2e-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

package_linux:
name: Package non-Windows projects
Expand Down Expand Up @@ -214,7 +195,7 @@ jobs:
env:
NODE_ENV: production
- name: Package projects
run: yarn nx run-many --target=package --parallel --verbose --exclude '*,!tag:linux'
run: yarn nx run-many --target=package --configuration=production --parallel --verbose --exclude '*,!tag:linux'
env:
NODE_ENV: production
DEBUG: 'playnite-web/*'
Expand Down Expand Up @@ -247,7 +228,7 @@ jobs:
env:
YARN_ENABLE_HARDENED_MODE: '0'
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --parallel --verbose --projects=tag:windows
run: yarn nx run-many --target=test/unit --configuration=production --parallel --verbose --projects=tag:windows

package_windows:
name: Package Windows projects
Expand Down Expand Up @@ -287,7 +268,7 @@ jobs:
env:
NODE_ENV: production
- name: Package projects
run: yarn nx run-many --target=package --exclude='*,!tag:windows'
run: yarn nx run-many --target=package --configuration=production --exclude='*,!tag:windows'
env:
NODE_ENV: production
- name: Upload artifacts
Expand Down
Loading

0 comments on commit 316495d

Please sign in to comment.