-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github/workflows: simulate a user integrating probe-engine
We want to have some confidence that a user can setup a Go repository and use probe-engine as a library. While this seems simple, our current dependency structure is complicated by the fact that psiphon does not have a go.mod file, so sometimes there are breakages. Part of #746
- Loading branch information
1 parent
ceaba5a
commit 667e532
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: qa | ||
on: | ||
push: | ||
schedule: | ||
- cron: "14 17 * * 3" | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: "1.14" | ||
- uses: actions/checkout@v2 | ||
- run: ./testusing.bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# This script simulates a user creating a new project that depends | ||
# on github.com/ooni/probe-engine@GITHUB_SHA. | ||
# | ||
|
||
set -ex | ||
mkdir -p example.org/x | ||
cd example.org/x | ||
go mod init example.org/x | ||
echo > main.go << EOF | ||
package main | ||
import "github.com/ooni/probe-engine/libminiooni | ||
func main() { | ||
libminiooni.Main() | ||
} | ||
EOF | ||
go get -v github.com/ooni/probe-engine@GITHUB_SHA | ||
go build -v . | ||
./x -OTunnel=psiphon -ni https://www.example.com urlgetter |