mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: 'mihomo test'
|
|
on: [workflow_dispatch]
|
|
jobs:
|
|
mihomo-test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Check out mieru repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: mieru
|
|
- name: Check out mihomo repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: MetaCubeX/mihomo
|
|
ref: Alpha
|
|
path: mihomo
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: mihomo/go.mod
|
|
- name: Update mieru reference
|
|
working-directory: mihomo
|
|
run: echo "replace github.com/enfein/mieru/v3 => ../mieru" >> go.mod
|
|
- name: Run go mod tidy
|
|
working-directory: mihomo
|
|
run: go mod tidy
|
|
- name: Show go mod diff
|
|
working-directory: mihomo
|
|
run: git --no-pager diff
|
|
- name: Build mihomo
|
|
working-directory: mihomo
|
|
run: make linux-amd64-compatible
|
|
- name: Copy mihomo binary
|
|
run: cp mihomo/bin/mihomo-linux-amd64-compatible mieru/mihomo
|
|
- name: Build mieru test binaries
|
|
working-directory: mieru
|
|
run: make test-binary
|
|
- name: Build mieru test docker image
|
|
working-directory: mieru
|
|
run: docker build -t mihomo:latest -f test/deploy/mihomo/Dockerfile .
|
|
- name: Run mieru test
|
|
run: docker run mihomo:latest
|