Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ci.yml with ci-compatibility.yml #511

Merged
merged 1 commit into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
86 changes: 0 additions & 86 deletions .github/workflows/ci-compatibility.yml

This file was deleted.

83 changes: 60 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,86 @@
# This is a basic workflow to help you get started with Actions
name: CI Check

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 1.8

- name: Setup Java ${{ matrix.jdk-version }}
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 8
# Runs a single command using the runners shell

- name: Set up Python 3.8
uses: actions/setup-python@v2
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@v2
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@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build

- name: Maven cache
uses: actions/cache@v2
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 and publish Locally
run: |
./gradlew build --info
./gradlew --info check publishToMavenLocal --warning-mode all

# - name: Publish Test Report
# if: ${{ always() }}
# uses: scacap/action-surefire-report@v1
# with:
# report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Clone dgs-examples-java
uses: actions/checkout@master
with:
repository: Netflix/dgs-examples-java
path: build/examples/dgs-examples-java

- name: Clone dgs-examples-kotlin
uses: actions/checkout@master
with:
repository: Netflix/dgs-examples-kotlin
path: build/examples/dgs-examples-kotlin

- 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

# - name: Publish Examples Test Report
# if: ${{ always() }}
# uses: scacap/action-surefire-report@v1
# with:
# check_name: Examples Test Reports
# report_paths: 'build/examples/**/build/test-results/test/TEST-*.xml'