ci #2585
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
test: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- java: 8 | |
os: ubuntu-latest | |
name: test_all | |
- java: 8 | |
os: windows-latest | |
name: scala_2_13 # TODO enable scripted test | |
- java: 8 | |
os: ubuntu-latest | |
name: scala_2_13 | |
- java: 21 | |
os: ubuntu-latest | |
name: test_all | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: adopt | |
- uses: actions/checkout@v4 | |
- uses: coursier/cache-action@v6 | |
- shell: bash | |
run: | | |
case ${{ matrix.name }} in | |
"test_all") | |
sbt -v \ | |
-no-colors \ | |
publishLocal \ | |
scalafmtSbtCheck \ | |
"+ scalafmtCheckAll" \ | |
launcher/test \ | |
plugin/scripted \ | |
scaffold/scripted \ | |
lib/test \ | |
app/compile | |
;; | |
"scala_2_13") | |
sbt -v SetScala213 app/test lib/test | |
;; | |
*) | |
echo "unknown job" | |
exit 1 | |
esac | |
push_gh_pages: | |
needs: test | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: adopt | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- uses: coursier/cache-action@v6 | |
- uses: webfactory/[email protected] | |
if: ${{ github.repository_owner == 'foundweekends' && github.ref == 'refs/heads/develop' && github.event_name == 'push' }} | |
with: | |
ssh-private-key: ${{ secrets.DEPLOY_KEY_1 }} | |
- name: Push to gh-pages | |
if: ${{ github.repository_owner == 'foundweekends' && github.ref == 'refs/heads/develop' && github.event_name == 'push' }} | |
run: | | |
# https://github.com/sbt/sbt-ghpages/commit/cbedd8edb8 | |
export SBT_GHPAGES_COMMIT_MESSAGE="auto commit on CI https://github.com/foundweekends/giter8/commit/${{ github.sha }}" | |
sbt -v pushSiteIfChanged |