Hedera Services Main #714
Workflow file for this run
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
name: Hedera Services Main | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [ 'current', 'latest' ] | |
steps: | |
- name: Cache Gradle packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 12 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '12' | |
distribution: 'adopt' | |
- name: Fetch Hedera Services | |
uses: actions/checkout@v2 | |
with: | |
repository: hashgraph/hedera-services | |
path: hedera-services | |
- name: Get Current Tag | |
working-directory: hedera-services | |
if: ${{ matrix.version == 'current' }} | |
run: | | |
git tag MASTER | |
echo "TAG=MASTER" >> .env | |
echo "TAG=MASTER" >> $GITHUB_ENV | |
- name: Get Latest Tag | |
if: ${{ matrix.version == 'latest' }} | |
working-directory: hedera-services | |
run: | | |
git fetch --unshallow --tags | |
export TAG=$(git log --tags --simplify-by-decoration --pretty="format:%d" | grep "^\s(tag:\sv[0-9]\+\.[0-9]\+\.[0-9]\+\(-[A-Za-z0-9]\+\(\.[0-9]\+\)\?\)\?)\$" | head -n 1 | sed -e "s#\s(tag:\s\(.*\))#\1#g") | |
echo "TAG=$TAG" > .env | |
echo "TAG=$TAG" > $GITHUB_ENV | |
- name: Build Hedera Services | |
working-directory: hedera-services | |
run: docker build -t services-node:$TAG . | |
- name: Set up Go 1.19 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
id: go | |
- name: Fetch Hedera SDK | |
uses: actions/checkout@v3 | |
with: | |
path: hedera-sdk-go | |
- name: Run Hedera SDK Tests | |
env: | |
OPERATOR_KEY: "302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137" | |
OPERATOR_ID: "0.0.2" | |
HEDERA_NETWORK: "localhost" | |
run: | | |
cd hedera-services | |
docker-compose up & | |
cd ../hedera-sdk-go | |
go test -tags="e2e" -coverprofile=coverage.out -covermode=atomic -v -timeout 9999s | |
- uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |