refactor(.github/workflows): reorganize many builds (#332)

1. reduce the number of periodic builds

2. just build as part of the release process in most cases

3. shorttests duplicates coverage

Preliminary changes as part of https://github.com/ooni/probe/issues/1466
This commit is contained in:
Simone Basso 2021-05-06 19:56:55 +02:00 committed by GitHub
parent 0f98caf3b4
commit fd333bad16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 42 additions and 74 deletions

View File

@ -1,13 +1,12 @@
# alltests runs the whole test suite
name: alltests name: alltests
on: on:
push: push:
branches: branches:
- 'release/**' - "release/**"
schedule:
- cron: "0 7 * * */1"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,10 +1,9 @@
# android verifies we can still build for Android # android checks whether we can build for Android
name: android name: android
on: on:
push: push:
branches: branches:
- "release/**" - "release/**"
- "master"
jobs: jobs:
test: test:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04

View File

@ -1,3 +1,5 @@
# CodeQL runs a CodeQL scan.
#
# For most projects, this workflow file will not need changing; you simply need # For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository. # to commit it to your repository.
# #
@ -7,12 +9,7 @@ name: "CodeQL"
on: on:
push: push:
branches: [ master, 'release/**' ] branches: [ "release/**" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '35 10 * * 1'
jobs: jobs:
analyze: analyze:
@ -22,7 +19,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'go' ] language: [ "go" ]
steps: steps:
- name: Checkout repository - name: Checkout repository

View File

@ -1,3 +1,4 @@
# coverage computes the code coverage
name: coverage name: coverage
on: on:
pull_request: pull_request:
@ -6,7 +7,7 @@ on:
- "master" - "master"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
go: [ "1.16" ] go: [ "1.16" ]

View File

@ -1,15 +1,12 @@
# Run end-to-end testing using miniooni # e2eminiooni runs end-to-end tests using miniooni
name: "e2eminiooni" name: "e2eminiooni"
on: on:
pull_request:
push: push:
branches: branches:
- master - "master"
schedule:
- cron: "25 */8 * * *"
jobs: jobs:
test: test:
runs-on: "ubuntu-latest" runs-on: "ubuntu-20.04"
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,13 +1,12 @@
# generate verifies that `go generate ./...` is not broken
name: generate name: generate
on: on:
push: push:
branches: branches:
- 'release/**' - "release/**"
schedule:
- cron: "0 0 * * */1"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,10 +1,9 @@
# ios verifies we can still build for iOS # ios checks whether we can build for iOS
name: ios name: ios
on: on:
push: push:
branches: branches:
- 'release/**' - "release/**"
- 'master'
jobs: jobs:
test: test:
runs-on: macos-10.15 runs-on: macos-10.15

View File

@ -2,12 +2,10 @@ name: jafar
on: on:
push: push:
branches: branches:
- 'release/**' - "release/**"
schedule:
- cron: "0 5 * * 3"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,15 +1,18 @@
# miniooni checks whether we can build the research client miniooni # miniooni checks whether we can build the research client miniooni
# and publishes all linux binaries as artefacts. There is no point in # and publishes the linux binaries as artefacts. There is no point in
# publishing windows or darwin binaries b/c they are not signed. # publishing windows or darwin binaries b/c they are not signed.
name: miniooni name: miniooni
on: on:
push: push:
branches:
- "release/**"
jobs: jobs:
test: test:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: ./make --disable-embedding-psiphon-config -t miniooni - run: ./make --disable-embedding-psiphon-config -t miniooni
- run: ./CLI/linux/amd64/miniooni --yes -nNi https://example.com web_connectivity - run: ./CLI/linux/amd64/miniooni --yes -nNi https://example.com web_connectivity
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1

View File

@ -1,13 +1,12 @@
# qafbmessenger runs QA checks for the fbmessenger experiment
name: "qafbmessenger" name: "qafbmessenger"
on: on:
push: push:
branches: branches:
- 'release/**' - "release/**"
schedule:
- cron: "0 3 * * */1"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,13 +1,12 @@
# qahhfm runs QA checks for the hhfm experiment
name: "qahhfm" name: "qahhfm"
on: on:
schedule:
- cron: "5 3 * * */1"
push: push:
branches: branches:
- 'release/**' - "release/**"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,13 +1,12 @@
# qahirl runs QA checks for the hirl experiment
name: "qahirl" name: "qahirl"
on: on:
schedule:
- cron: "10 3 * * */1"
push: push:
branches: branches:
- 'release/**' - "release/**"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,13 +1,12 @@
# qatelegram runs QA checks for the telegram experiment
name: "qatelegram" name: "qatelegram"
on: on:
schedule:
- cron: "15 3 * * */1"
push: push:
branches: branches:
- 'release/**' - "release/**"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,13 +1,12 @@
# qawebconnectivity runs QA checks for the webconnectivity experiment
name: "qawebconnectivity" name: "qawebconnectivity"
on: on:
push: push:
branches: branches:
- 'release/**' - "release/**"
schedule:
- cron: "20 3 * * */1"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,13 +1,12 @@
# qawhatsapp runs QA checks for the whatsapp experiment
name: "qawhatsapp" name: "qawhatsapp"
on: on:
schedule:
- cron: "25 3 * * */1"
push: push:
branches: branches:
- 'release/**' - "release/**"
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:

View File

@ -1,18 +0,0 @@
name: shorttests
on:
pull_request:
push:
branches:
- "master"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16" ]
steps:
- uses: actions/setup-go@v1
with:
go-version: "${{ matrix.go }}"
- uses: actions/checkout@v2
- run: go test -short -race -tags shaping ./...