Skip to content
Merged
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
17 changes: 0 additions & 17 deletions .dockerignore

This file was deleted.

48 changes: 43 additions & 5 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,58 @@ on:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 90
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: lts/*
node-version: 24
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Install Playwright Browsers
run: yarn install --frozen-lockfile

- name: Get installed Playwright version
id: playwright-version
run: echo "version=$(yarn --silent playwright --version | sed 's/Version //')" >> "$GITHUB_OUTPUT"

- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}

# `playwright install --with-deps` shells out to apt-get. On GitHub runners the
# dpkg lock is often held by background services (unattended-upgrades / apt-daily),
# which makes the install step hang indefinitely until the job times out.
# Stop those services first so apt can acquire the lock immediately.
- name: Free up the apt/dpkg lock
run: |
sudo systemctl stop apt-daily.service apt-daily-upgrade.service unattended-upgrades.service || true
sudo systemctl stop apt-daily.timer apt-daily-upgrade.timer || true
sudo flock --wait 60 /var/lib/dpkg/lock-frontend true || true

- name: Install Playwright browsers and system deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
timeout-minutes: 15
run: yarn playwright install --with-deps

- name: Install Playwright system deps (cached browsers)
if: steps.playwright-cache.outputs.cache-hit == 'true'
timeout-minutes: 15
run: yarn playwright install-deps

- name: Build app
run: yarn build:test

- name: Run Playwright tests
# Run the full cross-browser matrix only on pushes to main/master.
# Pull requests run chromium only to keep CI fast.
env:
FULL_BROWSERS: ${{ github.event_name == 'push' && '1' || '' }}
run: yarn playwright test
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report
Expand Down
52 changes: 0 additions & 52 deletions Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions components/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export const NavBar = ({ color, className }) => {
height={26}
width={174}
style={{ height: "26px", width: "auto" }}
priority
unoptimized
/>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/MetaTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const MetaTags = ({ theme }) => {

return (
<Head>
<title>{title} | {intl.formatMessage({ id: 'General.OoniExplorer' })}</title>
<title>{`${title} | ${intl.formatMessage({ id: 'General.OoniExplorer' })}`}</title>
<meta key="og:title" property="og:title" content={title} />
<meta
key="og:description"
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const SUPPORTED_LANGUAGES = [ 'en', 'zh-Hant', 'zh-CN', 'vi', 'tr', 'th', 'sw',

module.exports = withSentryConfig(
{
output: 'standalone',
env: {
LOCALES: JSON.stringify(SUPPORTED_LANGUAGES),
DEFAULT_LOCALE: DEFAULT_LOCALE,
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"devDependencies": {
"@biomejs/biome": "^2.4.6",
"@playwright/test": "^1.57.0",
"@playwright/test": "^1.61.1",
"@tailwindcss/postcss": "^4.2.2",
"@types/node": "^22.5.4",
"@types/nprogress": "^0.2.3",
Expand All @@ -64,7 +64,6 @@
"glob": "^10.5.0",
"imap-simple": "^5.1.0",
"jsdom": "^23.2.0",
"msw": "^2.1.0",
"mustache": "^4.2.0",
"postcss": "^8.5.10",
"start-server-and-test": "^2.0.3",
Expand All @@ -88,8 +87,5 @@
"git:getCommitSHA": "git rev-parse HEAD",
"git:getCommitSHA:short": "git rev-parse --short HEAD",
"git:getCommitRef": "git symbolic-ref HEAD"
},
"msw": {
"workerDirectory": "public"
}
}
4 changes: 1 addition & 3 deletions pages/as/[probe_asn].js
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ const NetworkDashboard = ({ probe_asn, networkName, countriesData }) => {
return (
<>
<Head>
<title>
{probe_asn} {networkName} | {intl.formatMessage({ id: 'General.OoniExplorer' })}
</title>
<title>{`${probe_asn} ${networkName} | ${intl.formatMessage({ id: 'General.OoniExplorer' })}`}</title>
</Head>
<div className="container">
<h1 className="mb-8 mt-16">
Expand Down
2 changes: 1 addition & 1 deletion pages/chart/mat.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const MeasurementAggregationToolkit = () => {
return (
<>
<Head>
<title>{intl.formatMessage({ id: 'MAT.Title' })} | {intl.formatMessage({ id: 'General.OoniExplorer' })}</title>
<title>{`${intl.formatMessage({ id: 'MAT.Title' })} | ${intl.formatMessage({ id: 'General.OoniExplorer' })}`}</title>
</Head>
<div className="container">
<div className="flex flex-col">
Expand Down
4 changes: 1 addition & 3 deletions pages/domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ const Domains = () => {
return (
<>
<Head>
<title>
{intl.formatMessage({ id: 'Domains.Title' })} | {intl.formatMessage({ id: 'General.OoniExplorer' })}
</title>
<title>{`${intl.formatMessage({ id: 'Domains.Title' })} | ${intl.formatMessage({ id: 'General.OoniExplorer' })}`}</title>
</Head>
<div className="container">
<StickySubMenu
Expand Down
2 changes: 1 addition & 1 deletion pages/findings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Index = ({ incidents }) => {
return (
<>
<Head>
<title>{intl.formatMessage({ id: 'Findings.Index.Title' })} | {intl.formatMessage({ id: 'General.OoniExplorer' })}</title>
<title>{`${intl.formatMessage({ id: 'Findings.Index.Title' })} | ${intl.formatMessage({ id: 'General.OoniExplorer' })}`}</title>
</Head>
<div className="container">
{user?.role === 'admin' && (
Expand Down
4 changes: 1 addition & 3 deletions pages/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ const Networks = () => {
return (
<>
<Head>
<title>
{intl.formatMessage({ id: 'Networks.Title' })} | {intl.formatMessage({ id: 'General.OoniExplorer' })}
</title>
<title>{`${intl.formatMessage({ id: 'Networks.Title' })} | ${intl.formatMessage({ id: 'General.OoniExplorer' })}`}</title>
</Head>
<div className="container">
<StickySubMenu
Expand Down
2 changes: 1 addition & 1 deletion pages/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const Search = () => {
return (
<>
<Head>
<title>{intl.formatMessage({ id: 'Search.PageTitle' })} | {intl.formatMessage({ id: 'General.OoniExplorer' })}</title>
<title>{`${intl.formatMessage({ id: 'Search.PageTitle' })} | ${intl.formatMessage({ id: 'General.OoniExplorer' })}`}</title>
<meta name="robots" content="noindex, nofollow" />
</Head>
<div className="container">
Expand Down
35 changes: 23 additions & 12 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,27 @@ export default defineConfig({
trace: 'on-first-retry',
},

/* Configure projects for major browsers */
/* Configure projects for major browsers.
* On PRs we only run chromium to keep CI fast; the full cross-browser
* matrix runs on pushes to main/master (FULL_BROWSERS=1). */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
...(process.env.FULL_BROWSERS
? [
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
]
: []),

/* Test against mobile viewports. */
// {
Expand All @@ -72,10 +77,16 @@ export default defineConfig({
// },
],

/* Run your local dev server before starting the tests */
/* Serve the app before starting the tests.
* On CI we run the optimized production build (`yarn start`) which is much
* faster and more stable than `next dev` (no on-demand route compilation).
* The build itself is produced by a separate CI step (`yarn build:test`). */
webServer: {
command: 'NODE_ENV=test yarn run dev',
command: process.env.CI
? 'NODE_ENV=test yarn start'
: 'NODE_ENV=test yarn run dev',
url: 'http://localhost:3100',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
})
Loading