Supabase API module #10
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: Scala CI | |
on: | |
pull_request: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
java: 8 | |
- os: ubuntu-latest | |
java: 11 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Cache Node.js modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Start Supabase | |
run: | | |
npx supabase start & | |
- name: Wait for Supabase to be ready | |
run: | | |
until curl --silent --fail http://localhost:54323; do | |
echo "Waiting for Supabase..." | |
sleep 5 | |
done | |
echo "Supabase is ready." | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: ${{ matrix.java }} | |
- uses: sbt/setup-sbt@v1 | |
- name: Cache SBT dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.ivy2/cache | |
~/.sbt | |
~/.coursier | |
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} | |
restore-keys: ${{ runner.os }}-sbt- | |
- name: Create header and run scalafmt | |
run: sbt headerCreateAll scalafmtAll | |
- name: Build and Test with Coverage | |
run: sbt clean coverage test coverageReport coverageAggregate | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./target/scala-*/scoverage-report/scoverage.xml | |
fail_ci_if_error: true | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: target/test-reports | |
# Optional: Upload dependency graph | |
# - name: Upload dependency graph | |
# uses: scalacenter/sbt-dependency-submission@ab086b50c947c9774b70f39fc7f6e20ca2706c91 |