From 0c48bc0746d5036603e648c7110bde0ab20258d9 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 3 Feb 2021 13:20:37 +0100 Subject: [PATCH] refactor: enable QA tests and jafar self test (#208) * refactor: enable QA tests and jafar self test Part of https://github.com/ooni/probe/issues/1335 * chore: make sure all workflows run on release branches --- {internal/engine/.github => .github}/workflows/jafar.yml | 5 ++++- .../engine/.github => .github}/workflows/qafbmessenger.yml | 0 {internal/engine/.github => .github}/workflows/qahhfm.yml | 3 +++ {internal/engine/.github => .github}/workflows/qahirl.yml | 3 +++ .../engine/.github => .github}/workflows/qatelegram.yml | 3 +++ .../.github => .github}/workflows/qawebconnectivity.yml | 0 .../engine/.github => .github}/workflows/qawhatsapp.yml | 3 +++ {internal/engine/QA => QA}/.dockerignore | 0 {internal/engine/QA => QA}/.gitignore | 0 {internal/engine/QA => QA}/Dockerfile | 0 {internal/engine/QA => QA}/README.md | 0 {internal/engine/QA => QA}/common.py | 0 {internal/engine/QA => QA}/fbmessenger.py | 0 {internal/engine/QA => QA}/hhfm.py | 0 {internal/engine/QA => QA}/hirl.py | 0 {internal/engine/QA => QA}/minioonilike.py | 0 {internal/engine/QA => QA}/probeasn.py | 0 {internal/engine/QA => QA}/pyrun.sh | 4 ++-- {internal/engine/QA => QA}/rundocker.bash | 0 {internal/engine/QA => QA}/telegram.py | 0 {internal/engine/QA => QA}/webconnectivity.py | 0 {internal/engine/QA => QA}/whatsapp.py | 0 internal/engine/testjafar.bash => testjafar.bash | 0 23 files changed, 18 insertions(+), 3 deletions(-) rename {internal/engine/.github => .github}/workflows/jafar.yml (73%) rename {internal/engine/.github => .github}/workflows/qafbmessenger.yml (100%) rename {internal/engine/.github => .github}/workflows/qahhfm.yml (85%) rename {internal/engine/.github => .github}/workflows/qahirl.yml (85%) rename {internal/engine/.github => .github}/workflows/qatelegram.yml (86%) rename {internal/engine/.github => .github}/workflows/qawebconnectivity.yml (100%) rename {internal/engine/.github => .github}/workflows/qawhatsapp.yml (86%) rename {internal/engine/QA => QA}/.dockerignore (100%) rename {internal/engine/QA => QA}/.gitignore (100%) rename {internal/engine/QA => QA}/Dockerfile (100%) rename {internal/engine/QA => QA}/README.md (100%) rename {internal/engine/QA => QA}/common.py (100%) rename {internal/engine/QA => QA}/fbmessenger.py (100%) rename {internal/engine/QA => QA}/hhfm.py (100%) rename {internal/engine/QA => QA}/hirl.py (100%) rename {internal/engine/QA => QA}/minioonilike.py (100%) rename {internal/engine/QA => QA}/probeasn.py (100%) rename {internal/engine/QA => QA}/pyrun.sh (62%) rename {internal/engine/QA => QA}/rundocker.bash (100%) rename {internal/engine/QA => QA}/telegram.py (100%) rename {internal/engine/QA => QA}/webconnectivity.py (100%) rename {internal/engine/QA => QA}/whatsapp.py (100%) rename internal/engine/testjafar.bash => testjafar.bash (100%) diff --git a/internal/engine/.github/workflows/jafar.yml b/.github/workflows/jafar.yml similarity index 73% rename from internal/engine/.github/workflows/jafar.yml rename to .github/workflows/jafar.yml index 9f5c2f4..c5c03ce 100644 --- a/internal/engine/.github/workflows/jafar.yml +++ b/.github/workflows/jafar.yml @@ -1,5 +1,8 @@ name: jafar on: + push: + branches: + - 'release/**' schedule: - cron: "0 5 * * 3" jobs: @@ -10,5 +13,5 @@ jobs: with: go-version: "1.14" - uses: actions/checkout@v2 - - run: go build -v ./cmd/jafar + - run: go build -v ./internal/cmd/jafar - run: sudo ./testjafar.bash diff --git a/internal/engine/.github/workflows/qafbmessenger.yml b/.github/workflows/qafbmessenger.yml similarity index 100% rename from internal/engine/.github/workflows/qafbmessenger.yml rename to .github/workflows/qafbmessenger.yml diff --git a/internal/engine/.github/workflows/qahhfm.yml b/.github/workflows/qahhfm.yml similarity index 85% rename from internal/engine/.github/workflows/qahhfm.yml rename to .github/workflows/qahhfm.yml index e7669bb..8e01b84 100644 --- a/internal/engine/.github/workflows/qahhfm.yml +++ b/.github/workflows/qahhfm.yml @@ -2,6 +2,9 @@ name: "qahhfm" on: schedule: - cron: "5 3 * * */1" + push: + branches: + - 'release/**' jobs: test: runs-on: ubuntu-latest diff --git a/internal/engine/.github/workflows/qahirl.yml b/.github/workflows/qahirl.yml similarity index 85% rename from internal/engine/.github/workflows/qahirl.yml rename to .github/workflows/qahirl.yml index c2d832e..e758f72 100644 --- a/internal/engine/.github/workflows/qahirl.yml +++ b/.github/workflows/qahirl.yml @@ -2,6 +2,9 @@ name: "qahirl" on: schedule: - cron: "10 3 * * */1" + push: + branches: + - 'release/**' jobs: test: runs-on: ubuntu-latest diff --git a/internal/engine/.github/workflows/qatelegram.yml b/.github/workflows/qatelegram.yml similarity index 86% rename from internal/engine/.github/workflows/qatelegram.yml rename to .github/workflows/qatelegram.yml index eb1af11..9a7349d 100644 --- a/internal/engine/.github/workflows/qatelegram.yml +++ b/.github/workflows/qatelegram.yml @@ -2,6 +2,9 @@ name: "qatelegram" on: schedule: - cron: "15 3 * * */1" + push: + branches: + - 'release/**' jobs: test: runs-on: ubuntu-latest diff --git a/internal/engine/.github/workflows/qawebconnectivity.yml b/.github/workflows/qawebconnectivity.yml similarity index 100% rename from internal/engine/.github/workflows/qawebconnectivity.yml rename to .github/workflows/qawebconnectivity.yml diff --git a/internal/engine/.github/workflows/qawhatsapp.yml b/.github/workflows/qawhatsapp.yml similarity index 86% rename from internal/engine/.github/workflows/qawhatsapp.yml rename to .github/workflows/qawhatsapp.yml index 4e49cf1..135f577 100644 --- a/internal/engine/.github/workflows/qawhatsapp.yml +++ b/.github/workflows/qawhatsapp.yml @@ -2,6 +2,9 @@ name: "qawhatsapp" on: schedule: - cron: "25 3 * * */1" + push: + branches: + - 'release/**' jobs: test: runs-on: ubuntu-latest diff --git a/internal/engine/QA/.dockerignore b/QA/.dockerignore similarity index 100% rename from internal/engine/QA/.dockerignore rename to QA/.dockerignore diff --git a/internal/engine/QA/.gitignore b/QA/.gitignore similarity index 100% rename from internal/engine/QA/.gitignore rename to QA/.gitignore diff --git a/internal/engine/QA/Dockerfile b/QA/Dockerfile similarity index 100% rename from internal/engine/QA/Dockerfile rename to QA/Dockerfile diff --git a/internal/engine/QA/README.md b/QA/README.md similarity index 100% rename from internal/engine/QA/README.md rename to QA/README.md diff --git a/internal/engine/QA/common.py b/QA/common.py similarity index 100% rename from internal/engine/QA/common.py rename to QA/common.py diff --git a/internal/engine/QA/fbmessenger.py b/QA/fbmessenger.py similarity index 100% rename from internal/engine/QA/fbmessenger.py rename to QA/fbmessenger.py diff --git a/internal/engine/QA/hhfm.py b/QA/hhfm.py similarity index 100% rename from internal/engine/QA/hhfm.py rename to QA/hhfm.py diff --git a/internal/engine/QA/hirl.py b/QA/hirl.py similarity index 100% rename from internal/engine/QA/hirl.py rename to QA/hirl.py diff --git a/internal/engine/QA/minioonilike.py b/QA/minioonilike.py similarity index 100% rename from internal/engine/QA/minioonilike.py rename to QA/minioonilike.py diff --git a/internal/engine/QA/probeasn.py b/QA/probeasn.py similarity index 100% rename from internal/engine/QA/probeasn.py rename to QA/probeasn.py diff --git a/internal/engine/QA/pyrun.sh b/QA/pyrun.sh similarity index 62% rename from internal/engine/QA/pyrun.sh rename to QA/pyrun.sh index 6dd32bb..76f3f28 100755 --- a/internal/engine/QA/pyrun.sh +++ b/QA/pyrun.sh @@ -1,6 +1,6 @@ #!/bin/sh set -ex export GOPATH=/jafar/QA/GOPATH GOCACHE=/jafar/QA/GOCACHE GO111MODULE=on -go build -v ./cmd/miniooni -go build -v ./cmd/jafar +go build -v ./internal/cmd/miniooni +go build -v ./internal/cmd/jafar sudo ./QA/$1.py ./miniooni diff --git a/internal/engine/QA/rundocker.bash b/QA/rundocker.bash similarity index 100% rename from internal/engine/QA/rundocker.bash rename to QA/rundocker.bash diff --git a/internal/engine/QA/telegram.py b/QA/telegram.py similarity index 100% rename from internal/engine/QA/telegram.py rename to QA/telegram.py diff --git a/internal/engine/QA/webconnectivity.py b/QA/webconnectivity.py similarity index 100% rename from internal/engine/QA/webconnectivity.py rename to QA/webconnectivity.py diff --git a/internal/engine/QA/whatsapp.py b/QA/whatsapp.py similarity index 100% rename from internal/engine/QA/whatsapp.py rename to QA/whatsapp.py diff --git a/internal/engine/testjafar.bash b/testjafar.bash similarity index 100% rename from internal/engine/testjafar.bash rename to testjafar.bash