Skip to content

Commit

Permalink
Migrate to Jekyll, GitHub Actions
Browse files Browse the repository at this point in the history
This project uses AsciiDoc for doucmentation. The courses that use
this project no longer needs section numbering and content inclusion
features in documentation. That opens the door for going back to
Markdown, which is more widely used and simpler.

This project also uses Travis/AppVeyor for CI.
With the recent release of GitHub Actions, there is no need to depend
on external CI services.

Let's do the following changes:
* Migrate documentation from AsciiDoc to Markdown, and use Jekyll to
  generate the project website. The migration was done mostly by
  @j-lum, with minor cosmetic/content tweaks added by @damithc
* Migrate to GitHub Actions (from Travis and AppVeyor).

As a side-effect, we have to drop support for Coveralls,
because the current Coveralls set up depends on Travis.
We expect to bring back Coverall support in future.

We decided to do both major changes at the same time in order to
avoid some overlaps, and also snuck in some documentation tweaks
because almost every documentation line is touched by the
asciidoc to Markdown conversion anyway.
  • Loading branch information
damithc committed May 22, 2020
1 parent edad552 commit 0be83b2
Show file tree
Hide file tree
Showing 79 changed files with 3,092 additions and 3,627 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Java CI

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
- name: Set up repository
uses: actions/checkout@master

- name: Set up repository
uses: actions/checkout@master
with:
ref: master

- name: Merge to master
run: git checkout --progress --force ${{ github.sha }}

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
java-package: jdk+fx

- name: Build and check with Gradle
run: ./gradlew check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ src/test/data/sandbox/

# MacOS custom attributes files created by Finder
.DS_Store
docs/_site/
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

36 changes: 0 additions & 36 deletions README.adoc

This file was deleted.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions)

![Ui](docs/images/Ui.png)

* This is **a sample project for Software Engineering (SE) students**.<br>
Example usages:
* as a starting point of a course project (as opposed to writing everything from scratch)
* as a case study
* The project simulates an ongoing software project for a desktop application (called _AddressBook_) used for managing contact details.
* It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big.
* It comes with a **reasonable level of user and developer documentation**.
* It is named `AddressBook Level 3` (`AB3` for short) because it was initially created as a part of a series of `AddressBook` projects (`Level 1`, `Level 2`, `Level 3` ...).
* For the detailed documentation of this project, see the **[Address Book Product Website](https://se-education.org/addressbook-level3)**.
* This project is a **part of the se-education.org** initiative. If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info.
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

18 changes: 0 additions & 18 deletions appveyor.yml

This file was deleted.

100 changes: 1 addition & 99 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
// Gradle Configuration File
// For more details take a look at the Java Quickstart chapter in the Gradle
// user guide available at http://gradle.org/docs/5.2.1/userguide/tutorial_java_projects.html

import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
id 'java'
id 'jacoco'
id 'checkstyle'
id 'com.github.kt3k.coveralls' version '2.4.0'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'org.asciidoctor.convert' version '1.5.6'
id 'application'
}

// Specifies the entry point of the application
mainClassName = 'seedu.address.Main'

sourceCompatibility = JavaVersion.VERSION_11
Expand All @@ -29,14 +19,6 @@ checkstyle {
toolVersion = '8.1'
}

jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}

test {
useJUnitPlatform()
}
Expand Down Expand Up @@ -72,84 +54,4 @@ shadowJar {
destinationDir = file("${buildDir}/jar/")
}

task coverage(type: JacocoReport) {
sourceDirectories.from files(sourceSets.main.allSource.srcDirs)
classDirectories.from files(sourceSets.main.output)
executionData.from files(jacocoTestReport.executionData)
afterEvaluate {
classDirectories.from files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/*.jar'])
})
}
reports {
html.enabled = true
xml.enabled = true
}
}

coveralls {
sourceDirs = sourceSets.main.allSource.srcDirs.absolutePath
jacocoReportPath = "${buildDir}/reports/jacoco/coverage/coverage.xml"
}

tasks.coveralls {
dependsOn coverage
onlyIf { System.env.'CI' }
}

test {
testLogging {
events TestLogEvent.FAILED, TestLogEvent.SKIPPED

// Prints the currently running test's name in the CI's build log,
// so that we can check if tests are being silently skipped or
// stalling the build.
if (System.env.'CI') {
events << TestLogEvent.STARTED
}
}

jacoco {
destinationFile = new File("${buildDir}/jacoco/test.exec")
}
}

asciidoctor {
backends 'html5'
sourceDir 'docs'
outputDir "${buildDir}/docs"

options = [
template_dirs: [file("${sourceDir}/templates")],
]

attributes = [
linkcss: true,
stylesheet: 'gh-pages.css',
'source-highlighter': 'coderay',
icons: 'font',
experimental: true,
sectlinks: true,
idprefix: '', // for compatibility with GitHub preview
idseparator: '-',
'site-root': "${sourceDir}", // must be the same as sourceDir, do not modify
'site-name': 'AddressBook-Level3',
'site-githuburl': 'https://github.com/se-edu/addressbook-level3',
'site-seedu': true, // delete this line if your project is not a fork (not a SE-EDU project)
]

options['template_dirs'].each {
inputs.files fileTree(it)
}
}

// Copies stylesheets into the directory containing generated HTML files as
// Asciidoctor does not copy linked CSS files to the output directory when rendering.
// This is needed for linked stylesheets and embedded stylesheets which import other files.
task copyStylesheets(type: Copy) {
from "${asciidoctor.sourceDir}/stylesheets"
into "${asciidoctor.outputDir}/html5/stylesheets"
}
asciidoctor.dependsOn copyStylesheets

defaultTasks 'clean', 'test', 'coverage', 'asciidoctor'
defaultTasks 'clean', 'test'
56 changes: 0 additions & 56 deletions docs/AboutUs.adoc

This file was deleted.

59 changes: 59 additions & 0 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
layout: page
title: About Us
---

_{The dummy content given below serves as a placeholder to be used by future forks of the project.}_

We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg).

## Project Team

### John Doe

<img src="images/damithc.jpg" width="200px">

[[homepage](http://www.comp.nus.edu.sg/~damithch)]
[[github](https://github.com/damithc)]
[[portfolio](team/johndoe.md)]

* Role: Project Advisor

### John Roe

<img src="images/lejolly.jpg" width="200px">

[[github](http://github.com/lejolly)]
[[portfolio](team/johndoe.md)]

* Role: Team Lead
* Responsibilities: UI

### Johnny Doe

<img src="images/yijinl.jpg" width="200px">

[[github](http://github.com/yijinl)] [[portfolio](team/johndoe.md)]

* Role: Developer
* Responsibilities: Data

### Johnny Roe

<img src="images/m133225.jpg" width="200px">

[[github](http://github.com/m133225)]
[[portfolio](team/johndoe.md)]

* Role: Developer
* Responsibilities: Dev Ops + Threading

### Benson Meier

<img src="images/yl_coder.jpg" width="200px">

[[github](http://github.com/yl-coder)]
[[portfolio](team/johndoe.md)]

* Role: Developer
* Responsibilities: UI
7 changes: 0 additions & 7 deletions docs/ContactUs.adoc

This file was deleted.

Loading

0 comments on commit 0be83b2

Please sign in to comment.