4
4
name : Sakai Server for Cypress
5
5
6
6
on :
7
- pull_request :
7
+ push :
8
8
9
9
jobs :
10
10
sakai-deploy :
@@ -14,12 +14,12 @@ jobs:
14
14
15
15
steps :
16
16
- name : Git Checkout
17
- uses : actions/checkout@v2
17
+ uses : actions/checkout@v4
18
18
- name : JDK 11
19
- uses : actions/setup-java@v1
19
+ uses : actions/setup-java@v4
20
20
with :
21
21
java-version : 11
22
- architecture : x64
22
+ distribution : ' temurin '
23
23
- name : Cache local Maven repository
24
24
uses : actions/cache@v2
25
25
with :
38
38
export TOMCAT_DIR=$PWD/tomcat
39
39
mkdir $TOMCAT_DIR
40
40
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
42
42
tar --strip-components=1 -xzf tomcat.tar.gz
43
43
git clone https://github.com/sakaiproject/nightly-config.git sakai
44
44
cp sakai/master.properties sakai/sakai.properties
@@ -54,37 +54,35 @@ jobs:
54
54
echo "log.config=DEBUG.org.mariadb.jdbc" >> sakai/local.properties
55
55
cd ..
56
56
mvn --batch-mode -DskipTests install sakai:deploy-exploded -Dmaven.tomcat.home=$TOMCAT_DIR
57
+ - name : Build skins
58
+ env :
59
+ 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
60
+ run : |
61
+ cd library
62
+ for file in src/skins/default/src/sass/themes/_*.scss; do
63
+ theme=${file##*/} # Extract the full filename
64
+ theme=${theme#_} # Remove leading underscore
65
+ theme=${theme%.scss} # Remove file extension
66
+ mvn --batch-mode -o -DskipTests -Dmaven.tomcat.home=$TOMCAT_DIR install sakai:deploy-exploded -Dsakai.skin.target=$theme
67
+ - name : Package Deployed Skin
68
+ run : |
69
+ tar -czvf library-skin.tar.gz -C $TOMCAT_DIR/webapps/library/skin .
70
+ working-directory : ${{ github.workspace }}
71
+
72
+ - name : Upload Artifact
73
+ uses : actions/upload-artifact@v2
74
+ with :
75
+ name : library-skin
76
+ path : library-skin.tar.gz
77
+ - name : Start Tomcat
78
+ run : |
57
79
cd $TOMCAT_DIR
58
80
bin/catalina.sh start
59
81
- name : Start cloudflared
60
82
run : |
61
83
curl -sL -o cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
62
84
sudo dpkg -i cloudflared.deb
63
85
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
86
# - name: Sleep fifteen minutes to allow testing
89
87
# if: ${{ always() }}
90
- # run: sleep 15m
88
+ # run: sleep 4h
0 commit comments