Skip to content

Commit

Permalink
Inception
Browse files Browse the repository at this point in the history
  • Loading branch information
ledoyen committed Jul 13, 2024
1 parent f8c596f commit c32bdbe
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

charset = utf-8

indent_style = space
indent_size = 4

[*.yml]
indent_size = 2
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
19 changes: 19 additions & 0 deletions .github/workflows/automerge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Dependabot auto-merge

on:
workflow_call:

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on:
workflow_call:
inputs:
java-version:
type: string
description: The Java version to set up. See https://github.com/actions/setup-java/blob/v4/action.yml#L6
default: '21'
secrets:
GH_TOKEN_REPO:
description: Token to access private repositories of the lernejo org
required: true
CODECOV_TOKEN:
description: Repository Codecov token. See https://github.com/codecov/codecov-action/blob/v4/action.yml#L5
required: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ inputs.java-version }}
cache: maven

- name: Debug JDK info
run: |
java -version
./mvnw -version
echo $JAVA_HOME
- name: Run tests
run: ./mvnw -U test -Dgithub_token="$GH_TOKEN_REPO" -DfailIfNoTests
env:
GH_TOKEN_REPO: ${{ secrets.GH_TOKEN_REPO }}

- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ env.CODECOV_TOKEN != '' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### IntelliJ IDEA ###
.idea/
*.iml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# reusable-workflows

Reusable GH workflows for the grading ecosystem

0 comments on commit c32bdbe

Please sign in to comment.