Skip to content

Commit

Permalink
Update CI (#378)
Browse files Browse the repository at this point in the history
Co-authored-by: Jules Ivanic <[email protected]>
  • Loading branch information
guizmaii and jivanic-demystdata authored Jul 23, 2024
1 parent 42eab54 commit 7da252d
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 45 deletions.
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"
59 changes: 59 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'

version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: minor

categories:
- title: 'Features'
label: 'enhancement'
- title: 'Bug Fixes'
label: 'bug'

exclude-labels:
- 'skip'

autolabeler:
- label: 'bug'
title:
- '/.*\[fix\].*/'
- label: 'patch'
title:
- '/.*\[fix\].*/'
- label: 'enhancement'
title:
- '/.*\[feat\].*/'
- label: 'minor'
title:
- '/.*\[feat\].*/'
- label: 'skip'
title:
- '/.*\[skip\].*/'
- label: 'major'
title:
- '/.*\[breaking\].*/'

replacers:
- search: '/\[feat\]/g'
replace: ''
- search: '/\[fix\]/g'
replace: ''
- search: '/\[skip\]/g'
replace: ''
- search: '/\[breaking\]/g'
replace: ''

template: |
# What's Changed
$CHANGES
32 changes: 0 additions & 32 deletions .github/workflows/CI.yaml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- run: env
shell: bash
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
check-latest: true
- name: tests
run: |
sbt clean +test
formatting:
runs-on: ubuntu-latest
steps:
- run: env
shell: bash
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
check-latest: true
- name: Formatting
run: |
sbt scalafmtSbtCheck scalafmtCheck test:scalafmtCheck
26 changes: 26 additions & 0 deletions .github/workflows/draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release Drafter

on:
push:
branches:
- main

pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
steps:
- uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 17 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
name: Release

on:
push:
branches: [master, main]
tags: ["*"]
release:
types: [ published ]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- run: env
shell: bash
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-gpg@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
check-latest: true
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/scala-steward.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: scala-steward
name: Scala Steward

# This workflow will launch everyday at 00:00
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch: {}

jobs:
scala-steward:
timeout-minutes: 45
runs-on: ubuntu-latest
name: Scala Steward
steps:
- uses: actions/checkout@v2
- name: Scala Steward Github Action
uses: scala-steward-org/[email protected]
- name: Scala Steward
uses: scala-steward-org/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-repository: ${{ github.repository }}
github-token: ${{ secrets.SCALA_STEWARD }}

0 comments on commit 7da252d

Please sign in to comment.