|
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:
|
@@ -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