Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Create Github Actions #87

Merged
merged 5 commits into from
Dec 17, 2019
Merged

Create Github Actions #87

merged 5 commits into from
Dec 17, 2019

Conversation

pablisco
Copy link

@pablisco pablisco commented Dec 16, 2019

This adds a Github workflow to run the library tests.

Bonus: Had to update dependencies to make it work with Github Actions.

@pablisco pablisco mentioned this pull request Dec 16, 2019
@pablisco pablisco changed the base branch from master to develop December 17, 2019 09:40
@@ -0,0 +1,15 @@
name: CI

on: [push]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will trigger a full build every single time there is a push on any branch.
This should be scoped to just master for example, and only trigger builds for pull requests:

on:
  pull_request
  push:
    branches:
      - master

For testing purposes, what you can do is to trigger a push on your dev branch temporary

on:
  push:
    branches:
      - mydevbranch

name: CI

on: [push]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you can add:

env:
  GRADLE_USER_HOME: .gradle

uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run Checks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and then you can add a cache here, as the project is very small, it will work:

- name: Cache dependencies
  uses: actions/cache@v1
  with:
    path: .gradle/caches
    key: gradle-cache-${{ hashFiles('**/*.gradle') }}
    restore-keys:   gradle-cache

with:
java-version: 1.8
- name: Run Checks
run: ./gradlew check --stacktrace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also add --no-daemon, do we also need to add buid?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check depends on build so it's not required explicitly

add cache and build on pull requests/push to master
@zegnus zegnus merged commit 3629309 into develop Dec 17, 2019
@zegnus zegnus deleted the github-actions-ci branch December 17, 2019 10:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants