Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Playwright tests + style updates #167

Merged
merged 14 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading