Skip to content

Release v0.19.0

Release v0.19.0 #495

Workflow file for this run

name: CI
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: dynver check
run: sbt dynverAssertVersion
- name: Scalafmt
run: sbt scalafmtCheck test:scalafmtCheck
- name: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt coverage test coverageReport
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Clean up
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- name: Generate example schemas
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt generateSchemas
- name: Install ajv
run: |
yarn global add ajv-cli ajv-formats
yarn global bin >> $GITHUB_PATH
- name: Validate generated schema
run: |
for schema in target/jsonoid-schemas/*.json; do
ajv compile --spec=draft2020 -s $schema -c ajv-formats
done
publish-package:
if: ${{ github.event_name != 'pull_request' }}
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: Publish package to GitHub
env:
DISABLE_ASSERTIONS: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt publish
publish-site:
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') }}
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: Publish site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sbt makeSite
sbt generateSchemas
cp target/jsonoid-schemas/*.json target/site/schemas
sbt publishToGitHubPages