Skip to content

TestJob

TestJob #507

Workflow file for this run

name: TestJob
# on:
# push:
# branches:
# - develop
on:
workflow_dispatch:
inputs:
tags:
description: 'tags'
required: false
type: boolean
schedule:
- cron: "40 20 */2 * *"
jobs:
build_and_test:
name: LiteSpeedTest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
ref: develop
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.1 # The Go version to download (if necessary) and use.
cache: true
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: |
go version
cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./web/gui/wasm_exec.js
npm install --prefix web/gui build
NODE_ENV=production npm run --prefix web/gui build
GOOS=js GOARCH=wasm go get -u ./...
GOOS=js GOARCH=wasm go build -o ./web/gui/dist/main.wasm ./wasm
- name: Run build
run: |
go build -o lite
- name: test link
run: |
echo '{"group": "cronjob", "speedtestMode": "all", "pingMethod": "googleping", "sortMethod": "rspeed", "concurrency": 2, "testMode": 2, "subscription": "https://raw.githubusercontent.com/freefq/free/master/v2", "timeout": 16, "language": "en", "fontSize": 24, "theme": "rainbow", "outputMode": 3}' > config.json
./lite --config config.json --test https://raw.githubusercontent.com/freefq/free/master/v2
ls
- name: Upload ZIP file to Artifacts
uses: actions/upload-artifact@v2
with:
name: out.json
path: out.json