Skip to content

Commit

Permalink
Merge pull request #167 from tjheffner/playwright
Browse files Browse the repository at this point in the history
Initial Playwright tests + style updates
  • Loading branch information
tjheffner authored May 28, 2024
2 parents d2226b1 + 34f2345 commit 3991082
Show file tree
Hide file tree
Showing 20 changed files with 1,121 additions and 165 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new-blog-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''
*** swap these for dashes for front matter
title: "post title"
date: 2022-01-16 00:00:00
category: note recipe snippet technical
category: note recipe technical diy
tags: extra context after category
description: "will show underneath title on list page"
***
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Playwright Tests

on: [pull_request]

env:
GITHUB_PR_NUMBER: ${{github.event.pull_request.number}}

jobs:
prepare:
name: Wait for Netlify deployment
runs-on: ubuntu-latest
steps:
- name: Waiting for Netlify Preview
uses: jakepartusch/[email protected]
id: wait-for-netlify-preview
with:
site_name: "heffner"
max_timeout: 180

test:
needs: prepare
name: Run tests against PR environment
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: install dependencies
run: npm ci
- name: install playwright browsers
run: npx playwright install --with-deps
- name: run tests
run: npm run test
env:
PLAYWRIGHT_TEST_BASE_URL: "https://deploy-preview-${{env.GITHUB_PR_NUMBER}}--heffner.netlify.app/"
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ node_modules

# Local Netlify folder
.netlify
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# heffdotdev

Tanner Heffner's personal website

This site is based on swyxkit, a lightly opinionated starter for Svelte projects:
Expand All @@ -10,18 +9,19 @@ This site is based on swyxkit, a lightly opinionated starter for Svelte projects
- [GitHub Issues as CMS](https://github.com/sw-yx/swyxkit/issues/10)

## Setup
create `.env` file with these values:
```
GH_TOKEN=
LASTFM_API_KEY=
STEAM_API_KEY=
```

```sh
npm install
npm run start
```

## Acknowledgements

- Homepage design inspired by Rene Stalder: https://renestalder.me/en/
- swyxkit & swyx.io for so many decisions, but especially github as cms + blog filtering
- Slice component design inspired by Rene Stalder: https://renestalder.me/en/
- Geoff Rich for dynamic og images https://geoffrich.net/posts/svelte-social-image/

## Todos

- customize json+ld
Loading

0 comments on commit 3991082

Please sign in to comment.