Skip to content

Commit

Permalink
Merge pull request #804 from wellcomecollection/test-autoformat-githu…
Browse files Browse the repository at this point in the history
…b-workflow

run auto formating script with github action
  • Loading branch information
agnesgaroux authored Sep 4, 2024
2 parents 3f7a593 + 8e6485d commit 6e86ee2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 60 deletions.
7 changes: 2 additions & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
steps:
- command: |
./builds/run_formatting.sh
.buildkite/scripts/push_autoformatting_changes.sh
./builds/run_linting.sh
label: "autoformat"
- command: ./builds/run_linting.sh
label: "linting"
agents:
queue: "scala"

Expand Down
49 changes: 0 additions & 49 deletions .buildkite/scripts/push_autoformatting_changes.sh

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Runs auto-formatting script on push to any branch
name: "Scala auto-formatting"

on: push

permissions:
id-token: write
contents: write

jobs:
autoformat:
uses: wellcomecollection/.github/.github/workflows/scala_formatting.yml@main
secrets: inherit
3 changes: 3 additions & 0 deletions builds/run_sbt_task_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ else
fi

docker run --tty --rm \
-e AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID:-}" \
-e AWS_SECRET_KEY="${AWS_SECRET_KEY:-}" \
-e AWS_SESSION_TOKEN="${AWS_SESSION_TOKEN:-}" \
--volume ~/.sbt:/root/.sbt \
--volume ~/.ivy2:/root/.ivy2 \
--volume "$HOST_COURSIER_CACHE:/root/$LINUX_COURSIER_CACHE" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,8 @@ class SierraItemUpdater(
def updateItems(items: Seq[DisplayItem]): Future[Seq[DisplayItem]] = {
val staleItemIds = items
.filter(item => item.isStale)
.map(
item => SierraItemIdentifier.fromSourceIdentifier(item.identifiers.head)
)
.map(item =>
SierraItemIdentifier.fromSourceIdentifier(item.identifiers.head))

staleItemIds.size match {
case 0 => Future.successful(items)
Expand All @@ -214,7 +213,5 @@ class SierraItemUpdater(
private def parseISOStringToLocalDate(isoString: String): LocalDate =
LocalDate.parse(
isoString,
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
)

DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"))
}

0 comments on commit 6e86ee2

Please sign in to comment.