Skip to content

Commit

Permalink
Cherry-pick goth nightly updates (#489)
Browse files Browse the repository at this point in the history
* Make goth runs compatible with yagna 0.7 (#470)

* Use dynamic stable branch in goth nightly (#480)
  • Loading branch information
kmazurek authored Jun 23, 2021
1 parent c8e9827 commit 374304d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/goth-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,42 @@ on:
- cron: '0 1 * * *'

jobs:
prepare-matrix:
name: Prepare matrix JSON
runs-on: ubuntu-latest
outputs:
matrix-json: ${{ steps.get-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

# finds branches with names matching 'b[0-9](\.[0-9])+' (e.g. b0.6) and returns the one with highest version
- name: Get latest stable branch
id: latest-stable
# sed removes leading whitespaces and '*' characters (git uses it to indicate the current branch)
run: |
branch=$(git branch -a | sed 's/remotes\/origin\///' | sed 's/^[ \t*]*//' | grep -E '^b[0-9](\.[0-9])+$' | sort -Vr | head -1)
echo "::set-output name=branch::$branch"
# prepares JSON object representing strategy matrix which contains two 'branch' variants: master and latest stable
- name: Get matrix JSON
id: get-matrix
run: echo "::set-output name=matrix::{\"include\":[{\"branch\":\"master\"},{\"branch\":\"${{ steps.latest-stable.outputs.branch }}\"}]}"

goth-tests:
name: Run integration tests (stable)
runs-on: goth
needs: prepare-matrix
strategy:
matrix: ${{ fromJson(needs.prepare-matrix.outputs.matrix-json) }}
fail-fast: false
name: Run integration tests (nightly) on ${{ matrix.branch }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'b0.5'
ref: ${{ matrix.branch }}

- name: Configure python
uses: actions/setup-python@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: integration-test
name: Goth (PR and push)

on:
push:
Expand All @@ -9,17 +9,12 @@ on:
branches:
- master
- b0.*
schedule:
# run this workflow every day at 1:30 AM UTC
- cron: '30 1 * * *'

jobs:

goth-tests:
name: Run integration tests
runs-on: goth
steps:

- name: Checkout
uses: actions/checkout@v2

Expand Down

0 comments on commit 374304d

Please sign in to comment.