Skip to content

Commit 35abcaa

Browse files
committed
Longsight Github Actions
1 parent c5ba67e commit 35abcaa

File tree

4 files changed

+60
-34
lines changed

4 files changed

+60
-34
lines changed

.github/workflows/server.yml

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Sakai Server for Cypress
55

66
on:
7-
pull_request:
7+
push:
88

99
jobs:
1010
sakai-deploy:
@@ -14,22 +14,22 @@ jobs:
1414

1515
steps:
1616
- name: Git Checkout
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
- name: JDK 11
19-
uses: actions/setup-java@v1
19+
uses: actions/setup-java@v4
2020
with:
2121
java-version: 11
22-
architecture: x64
22+
distribution: 'temurin'
2323
- name: Cache local Maven repository
24-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2525
with:
2626
path: ~/.m2/repository
2727
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2828
restore-keys: |
2929
${{ runner.os }}-maven-
3030
- name: Build with Maven
3131
env:
32-
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Dmaven.wagon.http.retryHandler.count=2 -Dmaven.wagon.http.pool=true
32+
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Dmaven.wagon.http.retryHandler.count=2 -Dmaven.wagon.http.pool=true -Denforcer.skip
3333
run: |
3434
sudo systemctl start mysql.service
3535
echo "127.0.0.1 repository.dev.java.net" | sudo tee -a /etc/hosts
@@ -38,7 +38,7 @@ jobs:
3838
export TOMCAT_DIR=$PWD/tomcat
3939
mkdir $TOMCAT_DIR
4040
cd $TOMCAT_DIR
41-
curl -s -o tomcat.tar.gz https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.78/bin/apache-tomcat-9.0.78.tar.gz
41+
curl -s -o tomcat.tar.gz https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.85/bin/apache-tomcat-9.0.85.tar.gz
4242
tar --strip-components=1 -xzf tomcat.tar.gz
4343
git clone https://github.com/sakaiproject/nightly-config.git sakai
4444
cp sakai/master.properties sakai/sakai.properties
@@ -54,37 +54,27 @@ jobs:
5454
echo "log.config=DEBUG.org.mariadb.jdbc" >> sakai/local.properties
5555
cd ..
5656
mvn --batch-mode -DskipTests install sakai:deploy-exploded -Dmaven.tomcat.home=$TOMCAT_DIR
57+
cd library
58+
for file in src/skins/default/src/sass/themes/_*.scss; do
59+
theme=${file##*/} # Extract the full filename
60+
theme=${theme#_} # Remove leading underscore
61+
theme=${theme%.scss} # Remove file extension
62+
mvn --batch-mode -o -DskipTests -Dmaven.tomcat.home=$TOMCAT_DIR install sakai:deploy-exploded -Dsakai.skin.target=$theme
63+
done
5764
cd $TOMCAT_DIR
5865
bin/catalina.sh start
66+
- name: Upload Artifact
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: longsight-skins
70+
path: tomcat/webapps/library/skin/
71+
compression-level: 9
72+
retention-days: 30
5973
- name: Start cloudflared
6074
run: |
6175
curl -sL -o cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
6276
sudo dpkg -i cloudflared.deb
6377
cloudflared tunnel --url http://localhost:8443 &
64-
- name: Cypress Checkout
65-
uses: actions/checkout@v2
66-
with:
67-
repository: sakaicontrib/cypress-sakai
68-
path: './cypress-sakai'
69-
- name: Cypress run
70-
uses: cypress-io/github-action@v2
71-
with:
72-
config: baseUrl=http://localhost:8080
73-
working-directory: cypress-sakai
74-
wait-on: 'http://localhost:8080/portal/'
75-
wait-on-timeout: 1800
76-
record: true
77-
browser: chrome
78-
headless: true
79-
env:
80-
CYPRESS_RECORD_KEY: f2049235-3f10-4142-a26c-fc017211a776
81-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82-
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
83-
- name: Check number of MySQL statements
84-
if: ${{ always() }}
85-
run: |
86-
export QUERIES=$(grep ProtocolLoggingProxy tomcat/logs/catalina.out|grep -v ROLLBACK|grep -v COMMIT | wc -l)
87-
echo "::notice title={MySQL Queries}::$QUERIES"
88-
# - name: Sleep fifteen minutes to allow testing
89-
# if: ${{ always() }}
90-
# run: sleep 15m
78+
- name: Sleep four hours
79+
if: ${{ always() }}
80+
run: sleep 4h
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* Light Theme */
2+
:root{
3+
// Primary Color
4+
@include defineColorHSL(--sakai-brand, 198, 87%, 52%);
5+
@include defineColorHSL(--sakai-color-blue, 198, 87%, 42%);
6+
7+
// Top header and logo wrapper
8+
--top-header-background: var(--sakai-brand);
9+
10+
// This is hover on site nav buttons
11+
--sakai-brand--lighter-6: #facfbd;
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* Light Theme */
2+
:root{
3+
// Primary Color
4+
@include defineColorHSL(--sakai-brand, 136, 90%, 12%);
5+
@include defineColorHSL(--sakai-color-blue, 226, 90%, 12%);
6+
7+
// Top header and logo wrapper
8+
--top-header-background: var(--sakai-brand);
9+
10+
// This is hover on site nav buttons
11+
--sakai-brand--lighter-6: #dcc379;
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* Light Theme */
2+
:root{
3+
// Primary Color
4+
@include defineColorHSL(--sakai-brand, 0, 0%, 100%);
5+
@include defineColorHSL(--sakai-color-blue, 240, 54%, 25%);
6+
7+
// Top header and logo wrapper
8+
--top-header-background: var(--sakai-color-blue);
9+
10+
// This is hover on site nav buttons
11+
--sakai-brand--lighter-6: #e5f8f9;
12+
}

0 commit comments

Comments
 (0)