-
Notifications
You must be signed in to change notification settings - Fork 4
149 lines (135 loc) · 3.8 KB
/
Copy pathci.yml
File metadata and controls
149 lines (135 loc) · 3.8 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: CI
env:
FORCE_COLOR: '1'
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
permissions:
id-token: write
pages: write
contents: read
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
scala: [3]
java: [temurin@25]
project: [js, jvm]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- if: matrix.project == 'jvm'
name: formatCheck
run: ./mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources
- uses: coursier/setup-action@main
with:
jvm: ${{ matrix.java }}
- uses: coursier/cache-action@main
- if: matrix.project == 'jvm'
name: playwright
run: cs launch com.microsoft.playwright:playwright:1.51.0 -M "com.microsoft.playwright.CLI" -- install --only-shell
- name: Compile
run: ./mill core.${{matrix.project}}.compile
- name: test
run: ./mill core.test.${{matrix.project}}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: always()
with:
fail_on_failure: false
include_passed: false
detailed_summary: true
annotate_only: true
require_tests: false
report_paths: 'out/**/test-report.xml'
publish:
if: github.repository == 'Quafadas/dedav4s' && contains(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-java@main
with:
distribution: 'temurin'
java-version: 25
- name: Publish to Maven Central
run: ./mill mill.javalib.SonatypeCentralPublishModule/
env:
MILL_PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
MILL_PGP_SECRET_BASE64: ${{ secrets.PGP_SECRET }}
MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
# Check that we can _generate_ the docs, but don't run upload / pages actions to actually deploy them for pull requests.
site_pr_check:
if: github.event_name == 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- run: ./mill site.siteGen
site:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- run: ./mill site.siteGen
- name: Setup Pages
uses: actions/configure-pages@main
- uses: actions/upload-artifact@main
with:
name: page
path: out/site/laika/generateSite.dest
if-no-files-found: error
deploy:
needs: site
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@main
with:
name: page
path: .
- uses: actions/configure-pages@main
- uses: actions/upload-pages-artifact@main
with:
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main