Skip to content
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
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
jobs:
CI:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: guardian/actions-assume-aws-role@v1.0.0
with:
awsRoleToAssume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}

# Node is needed for CDK
- name: Setup node
uses: guardian/actions-setup-node@v2.4.1
with:
cache: 'yarn'
cache-dependency-path: 'cdk/yarn.lock'

# Java is needed for the Scala Play app
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- run: ./scripts/ci
File renamed without changes.
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ lazy val root = (project in file("."))
fileDescriptorLimit := Some("16384"),
maintainer := "Guardian Developers <dig.dev.software@theguardian.com>",
topLevelDirectory in Universal := Some(normalizedName.value),
riffRaffPackageName := s"devx::${name.value}",
riffRaffManifestProjectName := riffRaffPackageName.value,
riffRaffPackageType := (packageBin in Debian).value,
riffRaffArtifactResources := Seq(
riffRaffPackageType.value -> s"${name.value}/${name.value}.deb",
Expand Down
19 changes: 0 additions & 19 deletions cdk/script/ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@

set -e

nvm_available() {
type -t nvm > /dev/null
}

source_nvm() {
if ! nvm_available; then
[ -e "/usr/local/opt/nvm/nvm.sh" ] && source /usr/local/opt/nvm/nvm.sh
fi
if ! nvm_available; then
[ -e "$HOME/.nvm/nvm.sh" ] && source "$HOME/.nvm/nvm.sh"
fi
}

source_nvm
nvm install
nvm use

npm install -g yarn

yarn install --frozen-lockfile
yarn lint
yarn build
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
// The Typesafe repository
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("com.gu" % "sbt-riffraff-artifact" % "1.1.9")
addSbtPlugin("com.gu" % "sbt-riffraff-artifact" % "1.1.16")

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.2")

Expand Down
7 changes: 6 additions & 1 deletion scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

set -e

if [[ ! -z "${TEAMCITY_VERSION}" ]]; then
echo "Running in TeamCity. Nope!"
exit 0
fi

# build CDK first to ensure it is on disk for SBT to pick up
(
cd cdk
./script/ci
)

sbt clean compile test riffRaffNotifyTeamcity
sbt clean compile test riffRaffUpload