Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to GitHub actions #455

Merged
merged 4 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .ci_scripts/jvmopts.sh

This file was deleted.

24 changes: 0 additions & 24 deletions .ci_scripts/validate.sh

This file was deleted.

156 changes: 0 additions & 156 deletions .circleci/config.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Check

on:
pull_request:

concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check-code-style:
name: Code Style
uses: playframework/.github/.github/workflows/cmd.yml@v2
with:
cmd: sbt validateCode

check-binary-compatibility:
name: Binary Compatibility
uses: playframework/.github/.github/workflows/binary-check.yml@v2

check-docs:
name: Docs
uses: playframework/.github/.github/workflows/cmd.yml@v2
with:
java: 11, 8
scala: 2.11.12, 2.12.15, 2.13.8
cmd: sbt ++$MATRIX_SCALA docs/test

tests:
name: Tests
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v2
with:
java: 11, 8
scala: 2.11.12, 2.12.15, 2.13.8
cmd: sbt ++$MATRIX_SCALA publishLocal test # scapegoat

finish:
name: Finish
needs: # Should be last
- "tests"
uses: playframework/.github/.github/workflows/rtm.yml@v2
13 changes: 13 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Publish

on:
push:
branches: # Snapshots
- main
tags: ["*"] # Releases

jobs:
publish-artifacts:
name: Publish / Artifacts
uses: playframework/.github/.github/workflows/publish.yml@v2
secrets: inherit
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Anorm

[![Build Status](https://github.com/playframework/anorm/actions/workflows/build-test.yml/badge.svg)](https://github.com/playframework/anorm/actions/workflows/build-test.yml)

Anorm is a simple data access layer that uses plain SQL to interact with the database and provides an API to parse and transform the resulting datasets.

- [User guide](https://playframework.github.io/anorm/)
Expand All @@ -24,8 +26,6 @@ To run the tests, use:

sbt test

[CircleCI](https://circleci.com/gh/playframework/anorm): ![CircleCI build status](https://circleci.com/gh/playframework/anorm.png?branch=main)

## Documentation

To run the documentation server, run:
Expand Down
10 changes: 0 additions & 10 deletions bin/travis

This file was deleted.

8 changes: 8 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,11 @@ lazy val docs = project
Scapegoat.settings

ThisBuild / playBuildRepoName := "anorm"

addCommandAlias(
"validateCode",
List(
"scalafmtSbtCheck",
"scalafmtCheckAll",
).mkString(";")
)
4 changes: 2 additions & 2 deletions core/src/test/scala/anorm/AnormSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ final class AnormSpec extends Specification with H2Database with AnormTest {
) { implicit c =>

SQL("SELECT * FROM test")
.as((SqlParser.int("id") ~ SqlParser.str("val").?).map({ case id ~ v =>
.as((SqlParser.int("id") ~ SqlParser.str("val").?).map { case id ~ v =>
(id -> v)
} *))
} *)
.aka("parsed list") must_=== List(9 -> None, 2 -> Some("str"))
}

Expand Down