Skip to content

Up go version

Up go version #210

Workflow file for this run

name: CI
on:
push:
branches:
- master
- staging
- trying
pull_request: {}
jobs:
# TODO: drop it when GitHub supports its by itself
cancel-previous:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.1
with:
access_token: ${{ github.token }}
linux:
name: ubuntu
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
go: [ 1.22.x ]
firefox: [ "130.0.1", "131.0.3", "132.0" ]
runs-on: ${{ matrix.os }}
env:
FIREFOX_VERSION: ${{ matrix.firefox }}
MOZ_HEADLESS: 1
DISPLAY: ":99.0"
steps:
- name: Set up golang
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download and install Firefox
run: |
export FIREFOX_SOURCE_URL="https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION&lang=en-US&os=linux64"
wget -O /tmp/firefox.tar.bz2 $FIREFOX_SOURCE_URL
mkdir -p $HOME/firefox
tar -jvxf /tmp/firefox.tar.bz2 -C $HOME/
- name: Startup Firefox in Headless mode
run: |
$HOME/firefox/firefox --version
$HOME/firefox/firefox -marionette > /dev/null 2>&1 &
sleep 10
- name: Confirm Marionette TCP port is open (ubuntu-latest)
run: netstat -ptln
- name: Run Tests
run: go test -test.v -race -coverprofile=coverage.txt -covermode=atomic
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.5
with:
infile: coverage.txt
outfile: coverage.lcov
- name: Coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
flag-name: run-${{ matrix.os }}-FF-${{ matrix.firefox }}
parallel: true
code-coverage:
needs: linux
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
windows:
name: windows
strategy:
fail-fast: false
matrix:
os: [ windows-latest ]
go: [ 1.17.x, 1.18.x ]
firefox: [ "98.0.2", "99.0.1", "100.0", "110.0.1" ]
runs-on: ${{ matrix.os }}
env:
FIREFOX_VERSION: ${{ matrix.firefox }}
MOZ_HEADLESS: 1
MOZ_MARIONETTE: 1
DISPLAY: ":99.0"
steps:
- name: Set up golang
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Go Version
run: go version
- name: Install Firefox
run: choco install Firefox --force --version=${{ matrix.firefox }} --params "/NoMaintenanceService /RemoveDistributionDir /NoTaskbarShortcut /NoDesktopShortcut /NoAutoUpdate /InstallDir:d:\ff"
- name: Test Firefox
run: |
netsh advfirewall set allprofiles state off
dir d:\ff
d:\ff\firefox.exe -Marionette
tasklist
netstat -aon -p TCP
go test -v -covermode=atomic
osx:
name: mac-os
strategy:
fail-fast: false
matrix:
os: [ macos-latest ]
go: [ 1.17.x, 1.18.x ]
firefox: [ "98.0.2", "99.0.1", "100.0", "110.0.1" ]
runs-on: ${{ matrix.os }}
env:
FIREFOX_VERSION: ${{ matrix.firefox }}
MOZ_HEADLESS: 1
MOZ_MARIONETTE: 1
DISPLAY: ":99.0"
steps:
- name: Set up golang
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Install Firefox
run: |
export FIREFOX_SOURCE_URL="https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION&lang=en-US&os=osx"
wget -O /tmp/firefox.dmg $FIREFOX_SOURCE_URL
mkdir -p $HOME/firefox
hdiutil attach /tmp/firefox.dmg | grep Volumes
ls -sl /Volumes/Firefox/*
cp -R /Volumes/Firefox/Firefox.app $HOME/firefox/Firefox.app
- name: Startup Firefox in Headless mode
run: |
$HOME/firefox/Firefox.app/Contents/MacOS/firefox --version
ls -sl $HOME/firefox/Firefox.app/Contents/MacOS/*
$HOME/firefox/Firefox.app/Contents/MacOS/firefox-bin -marionette > /dev/null 2>&1 &
sleep 5
netstat -p tcp -van | grep LISTEN
go test -test.v -race -covermode=atomic
ci-pass:
name: 'ci-pass'
runs-on: "ubuntu-latest"
needs: [linux, windows, osx]
steps:
- name: "Merge into master"
run: exit 0