Skip to content

Commit

Permalink
Configure and run lost-pixel on the screencaps from VHS
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidS-ovm committed Jul 1, 2024
1 parent ea48558 commit 1667d5f
Show file tree
Hide file tree
Showing 7 changed files with 1,184 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/e2eapply.tape
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Output apply.mp4
Output e2e/apply.mp4

Set Width 1920
Set Height 1080
Expand All @@ -15,4 +15,4 @@ Show
Type@1ms "overmind terraform apply -- tfplan"
Enter
Sleep 60
Screenshot apply.png
Screenshot e2e/apply.png
4 changes: 2 additions & 2 deletions .github/e2eplan.tape
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Output plan.mp4
Output e2e/plan.mp4

Set Width 1920
Set Height 1080
Expand All @@ -17,4 +17,4 @@ Enter
Sleep 2
Enter
Sleep 60
Screenshot plan.png
Screenshot e2e/plan.png
41 changes: 38 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,46 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: plan.mp4
path: plan.*
path: e2e/plan.*

- name: Upload plan results
- name: Upload apply results
if: always()
uses: actions/upload-artifact@v4
with:
name: apply.mp4
path: apply.*
path: e2e/apply.*

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
continue-on-error: false

- name: Lost Pixel
uses: lost-pixel/[email protected]
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ overmind.plan
terraform.tfstate
terraform.tfstate.backup
/tmp/
/node_modules
11 changes: 11 additions & 0 deletions lost-pixel.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { CustomProjectConfig } from 'lost-pixel';

export const config: CustomProjectConfig = {
customShots: {
currentShotsPath: "./lost-pixel",

// Lost Pixel Platform (to use in Platform mode, comment out the OSS mode and uncomment this part )
lostPixelProjectId: 'clfpdav6b0xkkln0ewld9jtqs',
apiKey: process.env.LOST_PIXEL_API_KEY,
}
};
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "cli",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"lost-pixel": "lost-pixel",
"lost-pixel:update": "lost-pixel update"
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "[email protected]+sha256.d6fc013639b81658ff175829ebb9435bcb89eff206769e460fd3ae27c2054df6",
"dependencies": {
"@types/node": "^20.14.9",
"lost-pixel": "^3.17.0"
}
}
Loading

0 comments on commit 1667d5f

Please sign in to comment.