Skip to content

Merge pull request #332 from scala-steward/update/alloy-core-0.2.7 #1517

Merge pull request #332 from scala-steward/update/alloy-core-0.2.7

Merge pull request #332 from scala-steward/update/alloy-core-0.2.7 #1517

Workflow file for this run

name: "Build"
on:
pull_request:
branches: ['**']
push:
branches: ['**']
tags: ['**']
workflow_dispatch:
inputs:
publishExtension:
description: 'Publish Extension'
required: true
default: false
type: boolean
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
jobs:
build:
name: "Build"
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v22
- uses: cachix/cachix-action@v12
with:
name: kubukoz
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Cache sbt
uses: actions/[email protected]
with:
path: |
~/.sbt
~/.ivy2/local
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
# This step isn't strictly necessary, but separating it means we can inspect its run time more easily.
- name: Setup environment
run: nix develop --command echo Environment ready
- name: Server tests
run: nix develop --command sbt ci
- name: VS Code extension tests
run: nix develop --command bash -c 'cd vscode-extension && yarn && SERVER_VERSION=$(cat ../.version) xvfb-run --auto-servernum yarn test'
- name: Show extension test logs
if: job.status == 'failure'
run: cat vscode-extension/fixture/smithyql-log.txt | tail --lines 1000
- name: release
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: nix develop --command sbt ci-release
- name: release plugin
if: github.event.inputs.publishExtension
run: nix develop --command ./release-plugin.sh
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}