From 72c8f17390bb4bad24670a51b753bb5dd2c790e3 Mon Sep 17 00:00:00 2001 From: Adam Staveley <31211028+adamstaveley@users.noreply.github.com> Date: Thu, 23 Jun 2022 15:31:44 +0200 Subject: [PATCH] Migrate CI/CD to Actions [part 1] (#28) * chore(ci): test build node workflow * chore(ci): initial build/test pipeline * chore(ci): on pull-request * chore(ci): fix typo on pull_request * chore(ci): fix yml syntax by incl. build object in jobs * chore(ci): use sudo for apt * chore(ci): named steps * chore(ci): no apt upgrade cmd * chore(ci): downgrade to jdk 11 * chore(ci): upgrade to jdk 15 * chore(ci): add info logs to build --- .github/workflows/build-test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..ba4f2e5 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,31 @@ +name: Build and Test Node + +on: + pull_request: + branches: + - develop + - master + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + + - name: Install ganache + run: | + sudo apt-get update + sudo apt-get install -y npm + sudo npm i -g ganache-cli + ganache-cli -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat" --port 8544 --accounts 20 --networkId=9 --gasLimit=10000000 > /dev/null & + + - name: Setup JDK/Gradle + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: '15' + cache: 'gradle' + + - name: Build + run: ./gradlew build --no-daemon --info