Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 1b038b1

Browse files
authored
Use Course Management Tools binaries in CI (#66)
1 parent 7affabd commit 1b038b1

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ jobs:
2020
# fetch-depth: 0 indicates all history. (CMT requires them)
2121
fetch-depth: 0
2222

23-
- name: Checkout Course Management Tools
24-
uses: actions/checkout@v2
23+
- name: Setup Course Management Tools
24+
uses: robinraju/release-downloader@v1
2525
with:
26-
repository: lightbend/course-management-tools
27-
path: CMT
26+
repository: eloots/course-management-tools
27+
tag: "1.0.0"
28+
fileName: "course-management-tools.zip"
29+
out-file-path: "."
30+
- run: |
31+
unzip course-management-tools.zip
32+
echo "::add-path::$GITHUB_WORKSPACE/course-management-tools/bin"
2833
2934
- name: Set up JDK 11
3035
uses: actions/setup-java@v1
@@ -53,13 +58,12 @@ jobs:
5358
run: |
5459
git config --global user.email "[email protected]"
5560
git config --global user.name "Lunatech Labs"
56-
(cd CMT/ && exec sbt "mainadm -dot -t ../runTests $GITHUB_WORKSPACE/course-repo")
61+
cmt-mainadm -dot -t runTests.sh $GITHUB_WORKSPACE/course-repo
5762
5863
- name: Run Tests
5964
run: |
60-
chmod +x runTests
61-
export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
62-
./runTests
65+
chmod +x runTests.sh
66+
./runTests.sh
6367
6468
create_release:
6569
runs-on: ubuntu-latest
@@ -68,19 +72,24 @@ jobs:
6872
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
6973

7074
steps:
71-
72-
- name: Checkout Course Management Tools
73-
uses: actions/checkout@v2
74-
with:
75-
repository: lightbend/course-management-tools
76-
path: CMT
7775

7876
- name: Checkout Course Repo
7977
uses: actions/checkout@v2
8078
with:
8179
path: lunatech-scala-2-to-scala3-course
8280
fetch-depth: 0
8381

82+
- name: Setup Course Management Tools
83+
uses: robinraju/release-downloader@v1
84+
with:
85+
repository: eloots/course-management-tools
86+
tag: "1.0.0"
87+
fileName: "course-management-tools.zip"
88+
out-file-path: "."
89+
- run: |
90+
unzip course-management-tools.zip
91+
echo "::add-path::$GITHUB_WORKSPACE/course-management-tools/bin"
92+
8493
- name: Set up JDK 11
8594
uses: actions/setup-java@v1
8695
with:
@@ -110,13 +119,13 @@ jobs:
110119
export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
111120
git config --global user.email "[email protected]"
112121
git config --global user.name "Lunatech Labs"
113-
(cd CMT/ && exec sbt "studentify -dot -g ../lunatech-scala-2-to-scala3-course ../studentified")
122+
cmt-studentify -dot -g lunatech-scala-2-to-scala3-course studentified
114123
(cd studentified && exec zip -r lunatech-scala-2-to-scala3-course-student.zip lunatech-scala-2-to-scala3-course)
115124
116125
- name: Linearize Repo
117126
run: |
118127
mkdir -p linearized
119-
(cd CMT/ && exec sbt "linearize -dot ../lunatech-scala-2-to-scala3-course ../linearized")
128+
cmt-linearize -dot lunatech-scala-2-to-scala3-course linearized
120129
mv linearized/lunatech-scala-2-to-scala3-course linearized/lunatech-scala-2-to-scala3-course-linearized
121130
(cd linearized && exec zip -r lunatech-scala-2-to-scala3-course-linearized.zip lunatech-scala-2-to-scala3-course-linearized)
122131

0 commit comments

Comments
 (0)