Repository navigation
Move the JS sources and tests to src/main/js and src/test/js #173
Workflow file for this run
This file contains hidden or 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: build | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [17, 25] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: sbt/setup-sbt@v1 | |
| - name: Cache sbt | |
| uses: actions/cache@v6 | |
| env: | |
| cache-name: cache-sbt-libs | |
| with: | |
| path: | | |
| ~/.ivy2/cache | |
| ~/.sbt | |
| ~/.cache/coursier/v1 | |
| key: build-${{ env.cache-name }}-${{ hashFiles('build.sbt') }} | |
| - name: Cache npm | |
| uses: actions/cache@v6 | |
| env: | |
| cache-name: cache-npm-modules | |
| with: | |
| path: ~/.npm | |
| key: build-${{ env.cache-name }}-${{ hashFiles('package.json') }} | |
| - name: Set up JDK | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| - name: Run tests | |
| run: | | |
| git clone https://github.com/gitbucket/gitbucket.git | |
| cd gitbucket | |
| sbt publishLocal | |
| cd ../ | |
| sbt test | |
| - name: Run JS tests | |
| run: | | |
| npm install | |
| npm test | |
| - name: Assembly | |
| run: | | |
| npm install | |
| npm run-script release | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: gitbucket-explorer-plugin-java${{ matrix.java }}-${{ github.sha }} | |
| path: ./target/scala-2.13/*.jar |