github.com/xxf098/lite-proxy@v0.15.1-0.20230422081941-12c69f323218/.github/workflows/cron.yaml (about)

     1  name: TestJob
     2  
     3  # on:
     4  #   push:
     5  #     branches:
     6  #     - develop
     7  on:
     8    workflow_dispatch:
     9      inputs:
    10        tags:
    11          description: 'tags'
    12          required: false
    13          type: boolean
    14    schedule:
    15    - cron: "40 20 */2 * *"
    16  
    17  
    18  jobs:
    19    build_and_test:
    20      name: LiteSpeedTest
    21      runs-on: ${{ matrix.os }}
    22      strategy:
    23              matrix:
    24                  os: [ubuntu-latest, macos-latest]
    25      steps:
    26      - uses: actions/checkout@v3
    27        with:
    28          ref: develop
    29      - name: Setup Go
    30        uses: actions/setup-go@v3
    31        with:
    32          go-version: 1.20.1 # The Go version to download (if necessary) and use.
    33          cache: true
    34  
    35      - uses: actions/setup-node@v3
    36        with:
    37          node-version: 16
    38  
    39      - name: Install dependencies
    40        run: |
    41          go version
    42          cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./web/gui/wasm_exec.js
    43          npm install --prefix web/gui build
    44          NODE_ENV=production  npm run --prefix web/gui build
    45          GOOS=js GOARCH=wasm go get -u ./...
    46          GOOS=js GOARCH=wasm go build -o ./web/gui/dist/main.wasm ./wasm
    47  
    48      - name: Run build
    49        run: | 
    50          go build -o lite
    51  
    52      - name: test link
    53        run: |
    54          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
    55          ./lite --config config.json --test https://raw.githubusercontent.com/freefq/free/master/v2
    56          ls
    57  
    58      - name: Upload ZIP file to Artifacts
    59        uses: actions/upload-artifact@v2
    60        with:
    61          name: out.json
    62          path: out.json