Skip to content

Commit bfbffbc

Browse files
authored
Merge pull request #44 from nulab/separate-ci-test
Separate workflow to test faster
2 parents ae51903 + 6ae4506 commit bfbffbc

26 files changed

+111
-17
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ jobs:
3030
- name: Set header
3131
run: sed -i -e 's/iaahStr = ""/iaahStr = "${{ secrets.IAAH }}"/' src/main/scala/com/nulabinc/backlog/r2b/Main.scala
3232

33-
- name: Compile
34-
run: sbt compile
33+
- name: Check format
34+
run: |
35+
mkdir -p dist
36+
sbt -no-colors checkAll > dist/result.txt
3537
3638
- name: Test
3739
run: 'sbt "testOnly com.nulabinc.*"'

.github/workflows/test.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Checkout submodules
17+
shell: bash
18+
run: |
19+
git config --global url."https://github.com/".insteadOf "git@github.com:"
20+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
21+
git submodule sync --recursive
22+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
23+
24+
- name: Setup Scala
25+
uses: olafurpg/setup-scala@v12
26+
with:
27+
java-version: "adopt@1.8"
28+
29+
- name: Coursier cache
30+
uses: coursier/cache-action@v6
31+
32+
- name: Check format
33+
run: |
34+
mkdir -p dist
35+
sbt -no-colors checkAll > dist/result.txt
36+
37+
- name: Test
38+
run: 'sbt "testOnly com.nulabinc.*"'
39+
40+
- name: Upload sbt result
41+
uses: actions/upload-artifact@master
42+
with:
43+
name: sbt-result
44+
path: dist
45+
46+
notify:
47+
runs-on: ubuntu-latest
48+
needs: build
49+
50+
steps:
51+
- name: Notify to Typetalk if success
52+
if: success()
53+
uses: shomatan/typetalk-action@master
54+
env:
55+
TYPETALK_TOKEN: ${{ secrets.TYPETALK_TOKEN }}
56+
with:
57+
topic-id: 54145
58+
message: ":tada: Redmine importer job success :smile:\n${{ github.event.repository.url }}/actions/runs/${{ github.run_id }}"
59+
60+
- name: Notify to Typetalk if fail
61+
if: failure()
62+
uses: shomatan/typetalk-action@master
63+
env:
64+
TYPETALK_TOKEN: ${{ secrets.TYPETALK_TOKEN }}
65+
with:
66+
topic-id: 54145
67+
message: ":rage: Redmine importer job failed\n${{ github.event.repository.url }}/actions/runs/${{ github.run_id }}"
68+
69+
- name: Notify to Typetalk if cancelled
70+
if: cancelled()
71+
uses: shomatan/typetalk-action@master
72+
env:
73+
TYPETALK_TOKEN: ${{ secrets.TYPETALK_TOKEN }}
74+
with:
75+
topic-id: 54145
76+
message: ":no_entry: Redmine importer job cancelled\n${{ github.event.repository.url }}/actions/runs/${{ github.run_id }}"
77+

.scalafix.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include "common/.scalafix.conf
1+
include "common/.scalafix.conf"

.scalafmt.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
version = 2.5.1
2-
3-
include "common/.scalafmt.conf"
1+
include "common/.scalafmt.conf"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Backlog Migration for Redmine
22

33
![](https://github.com/nulab/BacklogMigration-Redmine/workflows/Build/badge.svg)
4+
![](https://github.com/nulab/BacklogMigration-Redmine/workflows/Test/badge.svg)
45

56
Migrate your projects from Redmine to [Backlog].
67
(英語の下に日本文が記載されています)

src/main/scala/com/nulabinc/backlog/r2b/Main.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.nulabinc.backlog.r2b
22

33
import java.nio.file.Paths
44
import java.util.Locale
5+
56
import akka.actor.ActorSystem
67
import com.nulabinc.backlog.migration.common.client.IAAH
78
import com.nulabinc.backlog.migration.common.conf.{

src/main/scala/com/nulabinc/backlog/r2b/cli/R2BCli.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import com.nulabinc.backlog.migration.common.dsl.{ConsoleDSL, StorageDSL, StoreD
1414
import com.nulabinc.backlog.migration.common.interpreters.SQLiteStoreDSL
1515
import com.nulabinc.backlog.migration.common.modules.{ServiceInjector => BacklogInjector}
1616
import com.nulabinc.backlog.migration.common.service.{
17-
ProjectService,
1817
PriorityService => BacklogPriorityService,
18+
ProjectService,
1919
StatusService => BacklogStatusService,
2020
UserService => BacklogUserService
2121
}

src/main/scala/com/nulabinc/backlog/r2b/exporter/actor/IssueActor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import com.taskadapter.redmineapi.Include
2222
import com.taskadapter.redmineapi.bean.{Attachment, _}
2323
import spray.json._
2424

25-
import scala.jdk.CollectionConverters._
2625
import scala.concurrent.ExecutionContext.Implicits.global
2726
import scala.concurrent.duration._
27+
import scala.jdk.CollectionConverters._
2828

2929
/**
3030
* @author uchida

src/main/scala/com/nulabinc/backlog/r2b/exporter/actor/IssuesActor.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.nulabinc.backlog.r2b.exporter.actor
22

33
import java.util.concurrent.CountDownLatch
4+
45
import akka.actor.SupervisorStrategy.Restart
56
import akka.actor.{Actor, ActorRef, OneForOneStrategy, Props}
67
import akka.routing.SmallestMailboxPool

src/main/scala/com/nulabinc/backlog/r2b/exporter/actor/WikisActor.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.nulabinc.backlog.r2b.exporter.actor
22

33
import java.util.concurrent.CountDownLatch
4+
45
import akka.actor.SupervisorStrategy.Restart
56
import akka.actor.{Actor, OneForOneStrategy, Props}
67
import akka.routing.SmallestMailboxPool

0 commit comments

Comments
 (0)