Skip to content

Remove @vitest/browser #210

Remove @vitest/browser

Remove @vitest/browser #210

name: Integration Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
MOZ_LEGACY_HOME: 1
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Firefox (latest)
firefox-version: latest
test-filter: firefox
- name: Firefox ESR
firefox-version: latest-esr
test-filter: firefox
- name: Tor Browser
test-filter: tbb and not tbb_safer and not tbb_safest
tor: true
- name: Tor Browser (Safer)
test-filter: tbb_safer
tor: true
- name: Tor Browser (Safest)
test-filter: tbb_safest
tor: true
name: ${{ matrix.name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '25'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install sigsum
run: |
go install sigsum.org/sigsum-go/cmd/sigsum-key@latest
go install sigsum.org/sigsum-go/cmd/sigsum-submit@latest
- name: Install webcat CLI
run: npm install -g @freedomofpress/webcat-cli
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Firefox ${{ matrix.firefox-version }}
if: ${{ !matrix.tor }}
uses: browser-actions/setup-firefox@v1
with:
firefox-version: ${{ matrix.firefox-version }}
- name: Install Tor Browser
if: matrix.tor
run: |
TBB_URL=$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/download-linux-x86_64.json | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['binary'])")
echo "Installing Tor Browser from ${TBB_URL}"
curl -fsSL "${TBB_URL}" -o tbb.tar.xz
tar -xf tbb.tar.xz
echo "$PWD/tor-browser/Browser" >> "$GITHUB_PATH"
- name: Update NoScript
if: matrix.tor
run: |
NOSCRIPT_URL=$(curl -s https://dist.torproject.org/torbrowser/noscript/update-stable.json | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['addons']['{73a6fe31-595d-460b-a920-fcc0f8843232}']['updates'][0]['update_link'])")
echo "Updating NoScript from ${NOSCRIPT_URL}"
curl -fsSL "${NOSCRIPT_URL}" -o "$PWD/tor-browser/Browser/distribution/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
- name: Set up virtual display and dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq xvfb libnss3-tools
Xvfb :99 -screen 0 1024x768x24 &
echo "DISPLAY=:99" >> "$GITHUB_ENV"
- name: Initialize Firefox profile
if: ${{ !matrix.tor }}
run: |
firefox --headless -CreateProfile "default" 2>/dev/null || true
timeout 5 firefox --headless || true
- name: Run integration tests
run: |
make test TESTARGS="--addon ../dist/webcat-extension-test.zip \
--headless --reruns 2 --reruns-delay 5 --rerun-except Fatal -k '${{ matrix.test-filter }}'"