-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (45 loc) · 1.38 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
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
RELEASE: yesh
JAVA_OPTS: "-Xmx4G"
jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: sbt
- name: Compile
run: sbt --client 'compile; Test/compile'
- name: Run Unit and Stub tests
run: sbt --client fastTests
- name: Run Integration tests
run: sbt --client integrationTests
- name: Run Frontend tests
run: sbt --client frontendTests
- name: Publish local Docker image
run: sbt --client publishDocker
- uses: actions/upload-artifact@v3
if: failure()
with:
path: ./playwright-screenshots/
- uses: superfly/flyctl-actions/setup-flyctl@master
if: startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main')
- name: Deploy to fly.io
if: startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main')
run: "flyctl deploy -a jobby-web -i jobby-smithy4s:0.1.0-SNAPSHOT --local-only -c fly.toml"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}