feat: github action for tests

This commit is contained in:
Tormod Alf Try Tufteland 2022-07-06 18:08:45 +02:00 committed by Thomas Buckley-Houston
parent 8d321c47a1
commit 4955e243d8
4 changed files with 19377 additions and 6757 deletions

33
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build browsh
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
GOBIN: ${{ github.workspace }}/bin
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
working-directory: ./webext
- run: npm test
working-directory: ./webext
- uses: browser-actions/setup-firefox@latest
- run: firefox --version
- run: npm install
working-directory: ./webext
- run: npx webpack
working-directory: ./webext
- run: go test -v ./...
working-directory: ./interfacer

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
if [[ "$1" = "kill" ]]; then
pids=$(ps aux|grep headless|grep 'profile /tmp'| tr -s ' ' | cut -d ' ' -f2)
pids=$(ps aux|grep headless|grep 'profile '| tr -s ' ' | cut -d ' ' -f2)
if [[ $pids =~ [^0-9] ]] ; then
kill $pids
fi

26097
webext/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@
"prettier": "1.18.2",
"sinon": "^6.3.5",
"strip-ansi": "^4.0.0",
"web-ext": "^2.9.3",
"web-ext": "^7.1.0",
"webpack": "^4.33.0",
"webpack-cli": "^3.3.4"
},