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

Use Course Management Tools binaries in CI #66

Merged
merged 1 commit into from
Jul 28, 2020
Merged
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
41 changes: 25 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ jobs:
# fetch-depth: 0 indicates all history. (CMT requires them)
fetch-depth: 0

- name: Checkout Course Management Tools
uses: actions/checkout@v2
- name: Setup Course Management Tools
uses: robinraju/release-downloader@v1
with:
repository: lightbend/course-management-tools
path: CMT
repository: eloots/course-management-tools
tag: "1.0.0"
fileName: "course-management-tools.zip"
out-file-path: "."
- run: |
unzip course-management-tools.zip
echo "::add-path::$GITHUB_WORKSPACE/course-management-tools/bin"

- name: Set up JDK 11
uses: actions/setup-java@v1
Expand Down Expand Up @@ -53,13 +58,12 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "Lunatech Labs"
(cd CMT/ && exec sbt "mainadm -dot -t ../runTests $GITHUB_WORKSPACE/course-repo")
cmt-mainadm -dot -t runTests.sh $GITHUB_WORKSPACE/course-repo

- name: Run Tests
run: |
chmod +x runTests
export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
./runTests
chmod +x runTests.sh
./runTests.sh

create_release:
runs-on: ubuntu-latest
Expand All @@ -68,19 +72,24 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')

steps:

- name: Checkout Course Management Tools
uses: actions/checkout@v2
with:
repository: lightbend/course-management-tools
path: CMT

- name: Checkout Course Repo
uses: actions/checkout@v2
with:
path: lunatech-scala-2-to-scala3-course
fetch-depth: 0

- name: Setup Course Management Tools
uses: robinraju/release-downloader@v1
with:
repository: eloots/course-management-tools
tag: "1.0.0"
fileName: "course-management-tools.zip"
out-file-path: "."
- run: |
unzip course-management-tools.zip
echo "::add-path::$GITHUB_WORKSPACE/course-management-tools/bin"

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -110,13 +119,13 @@ jobs:
export PATH=${PATH}:$GITHUB_WORKSPACE/CMT/bin
git config --global user.email "[email protected]"
git config --global user.name "Lunatech Labs"
(cd CMT/ && exec sbt "studentify -dot -g ../lunatech-scala-2-to-scala3-course ../studentified")
cmt-studentify -dot -g lunatech-scala-2-to-scala3-course studentified
(cd studentified && exec zip -r lunatech-scala-2-to-scala3-course-student.zip lunatech-scala-2-to-scala3-course)

- name: Linearize Repo
run: |
mkdir -p linearized
(cd CMT/ && exec sbt "linearize -dot ../lunatech-scala-2-to-scala3-course ../linearized")
cmt-linearize -dot lunatech-scala-2-to-scala3-course linearized
mv linearized/lunatech-scala-2-to-scala3-course linearized/lunatech-scala-2-to-scala3-course-linearized
(cd linearized && exec zip -r lunatech-scala-2-to-scala3-course-linearized.zip lunatech-scala-2-to-scala3-course-linearized)

Expand Down