Skip to content

update sttp-apispec #718

update sttp-apispec

update sttp-apispec #718

Workflow file for this run

name: Test
on:
push:
branches: [master]
tags: [ v* ]
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
scalaVersion: ["2.13.12"]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v12
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
name: Cache scalajs-bundler node_modules
with:
path: "*/target/**/main/node_modules"
key: ${{ runner.os }}-scalajsbundler-node_modules-${{ hashFiles('*/yarn.lock') }}
restore-keys: ${{ runner.os }}-scalajsbundler-node_modules
- name: Cache Scalablytyped transpilations
uses: actions/cache@v2
with:
path: |
~/.ivy2/local/org.scalablytyped
~/.cache/scalablytyped
key: ${{ runner.os }}-scalablytyped-${{ hashfiles('build.sbt') }}-${{ hashFiles('*/yarn.lock') }}
restore-keys: |
${{ runner.os }}-scalablytyped-
- name: Test
run: sbt ++${{matrix.scalaVersion}} test
# - name: Debug over SSH (tmate)
# # if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
publish:
needs: [build]
# if this is not a pull request, run only on master or tags pushes.
# if this is a pull request, run only when 'publish' label is set
if: (github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))) ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'publish'))
strategy:
matrix:
os: [ubuntu-20.04]
scala: [2.13.12]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: olafurpg/setup-scala@v12
with:
java-version: 8
- name: Cache SBT
uses: coursier/cache-action@v6
- uses: olafurpg/setup-gpg@v3
- name: Publish
run: sbt version "git status" ci-release "git status"
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}