Skip to content

Commit

Permalink
github/workflows: simulate a user integrating probe-engine
Browse files Browse the repository at this point in the history
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
bassosimone committed Aug 26, 2020
1 parent ceaba5a commit 667e532
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/using.yml
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
23 changes: 23 additions & 0 deletions testusing.bash
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

0 comments on commit 667e532

Please sign in to comment.