Skip to content

Commit

Permalink
[WIP] initial conversion to GitHub actions
Browse files Browse the repository at this point in the history
Initial GH actions usage with (mostly) auto-generated config from circleci conversion tool

TODO:
- use gradle action
- remove circleci config
- why is env package_name added?
- (maybe) japicmp
  • Loading branch information
jimmyjames committed Jul 7, 2023
1 parent 9117b6c commit a55c4fc
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/actions/checkout-and-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: checkout-and-build
runs:
using: composite
steps:
- uses: actions/[email protected]
- run: chmod +x gradlew
shell: bash
- name: restore_cache
uses: actions/[email protected]
with:
key: v1-dependencies-{{ checksum "build.gradle" }}
restore-keys: |-
v1-dependencies-{{ checksum "build.gradle" }}
v1-dependencies-
- run: "./gradlew clean build"
shell: bash
- name: save_cache
uses: actions/[email protected]
with:
path: "~/.m2"
key: v1-dependencies-{{ checksum "build.gradle" }}
10 changes: 10 additions & 0 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: run-tests
runs:
using: composite
steps:
- run: "./gradlew check jacocoTestReport --continue --console=plain"
shell: bash
- uses: codecov/codecov-action@v3
with:
directory: ./coverage/
flags: unittests
25 changes: 25 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: auth0/auth0-java/build-and-test

on:
pull_request:
merge_group:
push:
branches: ["master", "main", "v1"]

# TODO what is the purpose of this?
env:
PACKAGE_NAME: xxxxh0

jobs:
build:
runs-on: ubuntu-latest
container:
image: openjdk:8-jdk
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
TERM: dumb
steps:
- uses: actions/[email protected]
- uses: "./.github/actions/checkout-and-build"
- uses: "./.github/actions/run-tests"

0 comments on commit a55c4fc

Please sign in to comment.