-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (65 loc) · 2.1 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: "Build"
on:
pull_request:
branches: ["**"]
push:
branches: ["**"]
tags: ["**"]
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: 10
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v23
- 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
build-parser:
name: "Build parser"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-13]
runs-on: ${{matrix.os}}
timeout-minutes: 10
steps:
- uses: actions/[email protected]
- uses: coursier/setup-action@v1
with:
apps: sbt
jvm: adoptium:1.21
- name: Parser tests
# intentionally not setting up nix
run: sbt parser/test