Merge pull request #286 from VirtusLab/dependabot/github_actions/cour… #716
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| jobs: | |
| scalafix: | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: coursier/cache-action@v8 | |
| - uses: coursier/setup-action@v3 | |
| with: | |
| jvm: 17 | |
| apps: 'sbt' | |
| - name: Run scalafix | |
| run: sbt "scalafixAll --check" | |
| format: | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: VirtusLab/scala-cli-setup@v1 | |
| - run: scala-cli fmt . --check | |
| test: | |
| needs: | |
| - format | |
| - scalafix | |
| runs-on: ${{ matrix.OS }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| OS: [ubuntu-24.04, macos-15-intel, macos-15, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: coursier/cache-action@v8 | |
| - uses: coursier/setup-action@v3 | |
| with: | |
| jvm: 17 | |
| apps: 'sbt' | |
| - name: Test | |
| run: sbt +test | |
| - name: Print help | |
| run: sbt "cli/run --help" | |
| publish: | |
| needs: | |
| - test | |
| - format | |
| - scalafix | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: coursier/cache-action@v8 | |
| - uses: coursier/setup-action@v3 | |
| with: | |
| jvm: 17 | |
| apps: 'sbt' | |
| - uses: olafurpg/setup-gpg@v3 | |
| - name: Release | |
| run: sbt ci-release | |
| env: | |
| PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
| PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |