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

Testplane 352.ubuntu deps test #1037

Closed
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
43 changes: 43 additions & 0 deletions .github/workflows/collect-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Collect ubuntu browser dependencies
on:
schedule:
- cron: 0 0 1 * *
permissions:
pull-requests: write
jobs:
collect:
name: Collect browser dependencies
runs-on: ${{ matrix.os }}
env:
BRANCH_NAME: resolve-ubuntu-dependencies-${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Setup Node JS
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org
- run: sudo apt-get update
- run: sudo apt-get install -y apt-file
- run: sudo apt-file update
- run: npm ci
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "y-infra"
- run: git checkout -b ${{ env.BRANCH_NAME }}
- run: npm run resolve-ubuntu-dependencies
- name: Commit changes
run: |
git add src && \
git commit src -m 'chore: update local browser dependencies for ${{ matrix.os }}' && \
git push origin ${{ env.BRANCH_NAME }} && \
gh pr create -B master -H ${{ env.BRANCH_NAME }} --title "Auto update local browser deps for ${{ matrix.os }}" --body "Created by Github action" || echo "No changes"
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/test-ubuntus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Collect ubuntu browser dependencies
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
collect:
name: Collect browser dependencies
runs-on: ${{ matrix.os }}
env:
BRANCH_NAME: resolve-ubuntu-dependencies-${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
steps:
- uses: actions/checkout@v2
- name: Setup Node JS
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org
- run: sudo apt-get update
- run: sudo apt-get install -y fontconfig
- run: npm ci
- run: npm run build
- run: cd e2e-test && npm i && DEBUG=testplane:browser-installer npx testplane install-deps && DEBUG=testplane:browser-installer WDIO_LOG_LEVEL=error npx testplane --local
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.sublime-project*
test/
examples/
tsconfig.json
167 changes: 167 additions & 0 deletions e2e-test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions e2e-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "e2e-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"testplane": "file:.."
}
}
9 changes: 9 additions & 0 deletions e2e-test/testplane-tests/example.testplane.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe("test", () => {
it("example", async ({ browser }) => {
await browser.url("https://github.com/gemini-testing/testplane");

await expect(browser.$(".f4.my-3")).toHaveText(
"Testplane (ex-hermione) browser test runner based on mocha and wdio",
);
});
});
5 changes: 5 additions & 0 deletions e2e-test/testplane-tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"types": ["testplane"]
}
}
67 changes: 67 additions & 0 deletions e2e-test/testplane.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
const mkChrome = (browserVersion: string): Record<string, unknown> => ({
desiredCapabilities: {
browserName: "chrome",
browserVersion,
"goog:chromeOptions": { args: ["--no-sandbox"] },
},
});

const mkFirefox = (browserVersion: string): Record<string, unknown> => ({
desiredCapabilities: {
browserName: "firefox",
browserVersion,
},
});

export default {
gridUrl: "local",
baseUrl: "http://localhost",
pageLoadTimeout: 0,
httpTimeout: 60000,
testTimeout: 90000,
resetCursor: false,
automationProtocol: "webdriver",
headless: true,
system: {
debug: true,
parallelLimit: 1,
},
sets: {
chrome: {
files: ["testplane-tests/**/*.testplane.(t|j)s"],
browsers: ["chrome75", "chrome80", "chrome90", "chrome100", "chrome110", "chrome120", "chrome130"],
},
firefox: {
files: ["testplane-tests/**/*.testplane.(t|j)s"],
browsers: [
"firefox60",
"firefox70",
"firefox80",
"firefox90",
"firefox100",
"firefox110",
"firefox120",
"firefox130",
"firefox134",
],
},
},
browsers: {
chrome75: mkChrome("75.0"),
chrome80: mkChrome("80.0"),
chrome90: mkChrome("90.0"),
chrome100: mkChrome("100.0"),
chrome110: mkChrome("110.0"),
chrome120: mkChrome("120.0"),
chrome130: mkChrome("130.0"),
firefox60: mkFirefox("60.0"),
firefox70: mkFirefox("70.0"),
firefox80: mkFirefox("80.0"),
firefox90: mkFirefox("90.0"),
firefox100: mkFirefox("100.0"),
firefox110: mkFirefox("110.0"),
firefox120: mkFirefox("120.0"),
firefox130: mkFirefox("130.0"),
firefox134: mkFirefox("134.0"),
},
};
Loading
Loading