[WIP] Introduce a GitHub Actions workflow for running the integration tests
This commit is contained in:
parent
4aca13e77a
commit
4d9d770806
53
.github/workflows/integration_tests.yml
vendored
Normal file
53
.github/workflows/integration_tests.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
name: Integration tests
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/integration_tests.yml'
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/integration_tests.yml'
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [lts/*]
|
||||
os: [windows-latest, ubuntu-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Update resolution (Windows)
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
|
||||
|
||||
- name: Run integration tests (Windows)
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
run: npx gulp integrationtest
|
||||
|
||||
- name: Run integration tests (Linux)
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
run: xvfb-run -a --server-args="-screen 0, 1920x1080x24" npx gulp integrationtest
|
||||
@ -169,6 +169,7 @@ describe("Checkbox annotation", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait("bug1847733.pdf", getAnnotationSelector("18R"));
|
||||
});
|
||||
|
||||
|
||||
@ -219,6 +219,7 @@ describe("autolinker", function () {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait(
|
||||
"issue3115r.pdf",
|
||||
".annotationLayer",
|
||||
|
||||
@ -90,6 +90,7 @@ describe("find bar", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait("xfa_imm5257e.pdf", ".xfaLayer");
|
||||
});
|
||||
|
||||
|
||||
@ -2391,6 +2391,7 @@ describe("FreeText Editor", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait("bug1823296.pdf", ".annotationEditorLayer");
|
||||
});
|
||||
|
||||
|
||||
@ -800,6 +800,7 @@ describe("Highlight Editor", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait(
|
||||
"issue12233.pdf",
|
||||
".annotationEditorLayer",
|
||||
|
||||
@ -53,7 +53,7 @@ async function runTests(results) {
|
||||
specDone(result) {
|
||||
// Report on the result of individual tests.
|
||||
++results.runs;
|
||||
if (result.failedExpectations.length > 0) {
|
||||
if (result.failedExpectations.length > 0 && !result.pendingReason) {
|
||||
++results.failures;
|
||||
console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`);
|
||||
} else {
|
||||
@ -63,14 +63,14 @@ async function runTests(results) {
|
||||
specStarted(result) {},
|
||||
suiteDone(result) {
|
||||
// Report on the result of `afterAll` invocations.
|
||||
if (result.failedExpectations.length > 0) {
|
||||
if (result.failedExpectations.length > 0 && !result.pendingReason) {
|
||||
++results.failures;
|
||||
console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`);
|
||||
}
|
||||
},
|
||||
suiteStarted(result) {
|
||||
// Report on the result of `beforeAll` invocations.
|
||||
if (result.failedExpectations.length > 0) {
|
||||
if (result.failedExpectations.length > 0 && !result.pendingReason) {
|
||||
++results.failures;
|
||||
console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`);
|
||||
}
|
||||
|
||||
@ -813,6 +813,7 @@ describe("Interaction", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait("issue13132.pdf", getSelector("171R"));
|
||||
});
|
||||
|
||||
@ -1276,6 +1277,7 @@ describe("Interaction", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait("bug1766987.pdf", getSelector("75R"));
|
||||
});
|
||||
|
||||
@ -1983,6 +1985,7 @@ describe("Interaction", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait("issue16863.pdf", getSelector("334R"));
|
||||
});
|
||||
|
||||
@ -2122,6 +2125,7 @@ describe("Interaction", () => {
|
||||
let pages;
|
||||
|
||||
beforeEach(async () => {
|
||||
pending("Linked PDFs are not supported.");
|
||||
pages = await loadAndWait("bug1860602.pdf", getSelector("22R"));
|
||||
});
|
||||
|
||||
|
||||
@ -809,6 +809,7 @@ function onAllSessionsClosedAfterTests(name) {
|
||||
}
|
||||
var runtime = (Date.now() - startTime) / 1000;
|
||||
console.log(name + " tests runtime was " + runtime.toFixed(1) + " seconds");
|
||||
process.exit(numErrors > 0 ? 1 : 0);
|
||||
};
|
||||
}
|
||||
|
||||
@ -1123,8 +1124,6 @@ async function main() {
|
||||
} else if (options.fontTest) {
|
||||
await startUnitTest("/test/font/font_test.html", "font");
|
||||
} else if (options.integration) {
|
||||
// Allows linked PDF files in integration-tests as well.
|
||||
await ensurePDFsDownloaded();
|
||||
await startIntegrationTest();
|
||||
} else {
|
||||
await startRefTest(options.masterMode, options.reftest);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user