Skip to content

Commit

Permalink
Merge pull request #31 from guardian/add-github-actions-ci
Browse files Browse the repository at this point in the history
Add CI with GitHub Actions
  • Loading branch information
rtyley authored Jan 11, 2024
2 parents 87c8327 + 0a21d64 commit 76e4df2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI
on:
workflow_dispatch:
pull_request:

# triggering CI default branch improves caching
# see https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11
cache: sbt
- name: Build and Test
run: sbt -v +test
- uses: EnricoMi/publish-unit-test-result-action@v2
if: always() #runs even if there is a test failure
with:
files: test-results/**/TEST-*.xml
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ lazy val releaseProcessSteps: Seq[ReleaseStep] = {

lazy val commonSettings = Seq(
organization := "com.gu",
Test / testOptions +=
Tests.Argument(TestFrameworks.ScalaTest, "-u", s"test-results/scala-${scalaVersion.value}", "-o"),
publishTo := sonatypePublishToBundle.value,
scmInfo := Some(ScmInfo(
url("https://github.com/guardian/scrooge-extras"),
Expand Down

0 comments on commit 76e4df2

Please sign in to comment.