I'm trying to use the github actions for first time, I've created and followed the tutorial from github and my .github/workflows/push_main.yml is :
name: Android CI
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
# Runs ktlint
- name: Lint
run: ./gradlew ktlintCheck
# Execute unit tests
- name: Unit Test
run: ./gradlew testDebugUnitTest
Also what I'd like to have is when trying to do a rebase or merge to main have this check and if it works then keep the action of rebase or merge I thought to do something like, create a temporal branch do the check there and if it works do the rebase or merge into main and then delete the temporal branch but I don't know if there's any other efficient way to do so. Also I've seen that I can run the jobs in parallel will it make it faster?
from Github actions decline action if fails
No comments:
Post a Comment