Hedera Services Main #705
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 JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Fetch Hedera SDK | |
uses: actions/checkout@v2 | |
with: | |
path: hedera-sdk-java | |
- name: Run Hedera SDK Tests | |
timeout-minutes: 30 | |
env: | |
OPERATOR_KEY: "302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137" | |
OPERATOR_ID: "0.0.2" | |
HEDERA_NETWORK: "localhost" | |
run: | | |
cd hedera-services | |
docker-compose up & | |
cd ../hedera-sdk-java | |
./gradlew -PHEDERA_NETWORK=$HEDERA_NETWORK -POPERATOR_KEY=$OPERATOR_KEY -POPERATOR_ID=$OPERATOR_ID integrationTest |