Skip to content

Commit

Permalink
consolidated playwright workflow into existing one
Browse files Browse the repository at this point in the history
  • Loading branch information
ma4nn committed Aug 19, 2024
1 parent a6df033 commit fd96338
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 37 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/playwright.yml

This file was deleted.

21 changes: 15 additions & 6 deletions .github/workflows/verify-lua-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
Expand All @@ -18,15 +18,24 @@ jobs:
luaVersion: "5.4"

- name: build
run: |
make
run: make

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: test
run: |
make test
run: make test

- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: moneymoney-sankey
path: dist/SankeyChart.lua
path: dist/SankeyChart.lua

- name: Archive test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.DEFAULT_GOAL := dist
INSTALL_DIR = ~/Library/Containers/com.moneymoney-app.retail/Data/Library/Application\ Support/MoneyMoney/Extensions
OUTPUT_FILE = dist/SankeyChart.lua
TMP_DIR = tmp/

.PHONY: dist
dist: clean
npm install
npm ci
npm run build

.PHONY: test
Expand All @@ -23,4 +24,5 @@ distclean:
rm dist/*.js

clean:
rm -f dist/* && (rmdir dist/ || true)
rm -f dist/* && (rmdir dist/ || true)
rm -rf $(TMP_DIR)
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
"build:js": "tsc && terser --compress --mangle -- $npm_package_config_outputDir/*.js",
"build": "npm-run-all build:* && mkdir -p $npm_package_config_outputDir && cp src/SankeyChart.lua $npm_package_config_outputDir && INLINE_CSS=`npm run build:css --silent` INLINE_JS=`npm run build:js --silent` node ./build.mjs",
"test": "npm-run-all test:*",
"test:compile-validate": "lua ./src/SankeyChartTest.lua > tmp/index.html && html-validate tmp/index.html",
"test:placeholder": "grep -qE '{{ ([a-zA-Z_]+) }}' $npm_package_config_outputDir/*.lua && (echo 'error: placeholders have not been replaced in dist!' && exit 1) || exit 0",
"test:validate": "npm-run-all test:validate:*",
"test:validate:compile": "mkdir -p tmp && lua ./src/SankeyChartTest.lua > tmp/index.html && html-validate tmp/index.html",
"test:validate:placeholder": "grep -qE '{{ ([a-zA-Z_]+) }}' $npm_package_config_outputDir/*.lua && (echo 'error: placeholders have not been replaced in dist!' && exit 1) || exit 0",
"test:e2e": "npx playwright test",
"start": "http-server tmp/"
},
Expand Down

0 comments on commit fd96338

Please sign in to comment.