Add distribution to CI build #1594
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4.7.1 | |
with: | |
python-version: 3.8 | |
- name: Install Python modules | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f scripts/requirements.txt ]; then pip install -r scripts/requirements.txt; fi | |
- uses: actions/cache@v3.3.2 | |
id: gradle-wrapper-cache | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} | |
restore-keys: ${{ runner.os }}-gradlewrapper- | |
- name: Cache Gradle packages | |
uses: actions/cache@v3.3.2 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Maven cache | |
uses: actions/cache@v3.3.2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build plugin and publish Locally | |
run: | | |
./gradlew --info check publishToMavenLocal --warning-mode all | |
- name: Clone dgs-examples-java | |
uses: actions/checkout@v4 | |
with: | |
repository: Netflix/dgs-examples-java-2.7 | |
path: build/examples/dgs-examples-java-2.7 | |
- name: Clone dgs-examples-kotlin | |
uses: actions/checkout@v4 | |
with: | |
repository: Netflix/dgs-examples-kotlin-2.7 | |
path: build/examples/dgs-examples-kotlin-2.7 | |
- name: Build Examples | |
run: | | |
find /home/runner/.m2/repository/ -type f -name "*graphql-dgs-codegen-gradle*" | |
./scripts/test-examples.py -v -k --path=./build/examples |