mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 11:04:00 +00:00
Experiment with action to run IA tests (#961)
* Experiment with action to run IA tests * Split out IA tests * Don't try on push * Also on push * Make an error an error * Introduce failing test * Return an error exit code * Remove failing test
This commit is contained in:
parent
efabd18745
commit
6d6dc1e8ba
2 changed files with 33 additions and 2 deletions
23
.github/workflows/ia-integration-tests.yml
vendored
Normal file
23
.github/workflows/ia-integration-tests.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: "Internet Archvie Integration Tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "0 8 * * *"
|
||||
|
||||
jobs:
|
||||
ia-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd experiments/archive-org-integration-tests
|
||||
yarn
|
||||
node ./index.js
|
||||
env:
|
||||
CI: true
|
||||
12
experiments/archive-org-integration-tests/index.js
Normal file → Executable file
12
experiments/archive-org-integration-tests/index.js
Normal file → Executable file
|
|
@ -49,7 +49,7 @@ async function testPage({ url, name, firstTrackText }) {
|
|||
} catch (e) {
|
||||
log(`🛑 Errored in [${name}]. Wrote screenshot to ./error.png`);
|
||||
await page.screenshot({ path: "error.png", fullPage: true });
|
||||
console.error(e);
|
||||
throw e;
|
||||
} finally {
|
||||
log("DONE");
|
||||
await browser.close();
|
||||
|
|
@ -87,4 +87,12 @@ async function main() {
|
|||
});
|
||||
}
|
||||
|
||||
main();
|
||||
(async function() {
|
||||
try {
|
||||
await main();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// Ensure process returns an error exit code so that other tools know the test failed.
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue