ci: migrate ubuntu-latest to ubuntu-24.04 #42
Workflow file for this run
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: unit tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Scala | |
uses: olafurpg/setup-scala@v12 | |
with: | |
java-version: [email protected] | |
- name: Unit Tests | |
run: | | |
set -e | |
sbt +clean coverage +test && sbt coverageReport coverageAggregate && (find $HOME/.sbt -name "*.lock" | xargs rm) && (find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm) | |
- name: Code Coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
flags: unittests # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
- name: Cache .ivy2 | |
uses: actions/cache@v2 | |
with: | |
path: ~/.ivy2 | |
key: ${{ runner.os }}-ivy2-${{ hashFiles('**/build.sbt') }} | |
- name: Cache .sbt | |
uses: actions/cache@v2 | |
with: | |
path: ~/.sbt | |
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.properties') }} | |
release: | |
if: github.repository == 'fulcrumgenomics/sopt' && github.ref == 'refs/heads/main' | |
needs: test | |
runs-on: ubuntu-24.04 | |
env: | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PASS: ${{ secrets.SONATYPE_PASS }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Scala | |
uses: olafurpg/setup-scala@v12 | |
with: | |
java-version: [email protected] | |
- name: Upload to Sonatype | |
run: | | |
sbt +publish |