forked from synthetic-sciences/openscience
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (102 loc) · 3.54 KB
/
Copy pathci.yml
File metadata and controls
112 lines (102 loc) · 3.54 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
typecheck:
name: Typecheck
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-bun
- run: bun run typecheck
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-bun
- run: bun run format:check
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-bun
- name: Configure git for tests
run: |
git config --global user.email "ci@openscience.dev"
git config --global user.name "OpenScience CI"
git config --global init.defaultBranch main
- run: bun run --cwd backend/cli test
build:
name: Build (web)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-bun
- name: Build workspace UI
run: bun run --cwd frontend/workspace build
- name: Build docs site
run: bun run --cwd frontend/docs build
# frontend/landing is standalone (own lockfile, not a workspace member),
# so the root typecheck/build jobs never touch it.
landing:
name: Build (landing)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-bun
- name: Install
working-directory: frontend/landing
run: bun install --frozen-lockfile
- name: Typecheck
working-directory: frontend/landing
run: bunx tsc -b
- name: Build
working-directory: frontend/landing
run: bun run build
# Packages with no typecheck task and scripts that otherwise only ever
# execute during a release — catch syntax errors before release day.
smoke:
name: Smoke (launcher + scripts)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-bun
- name: Launcher parses
run: node --check tooling/launcher/bin/synsci.mjs
- name: npm bin wrapper parses
run: node --check backend/cli/bin/openscience
- name: Install script parses
run: bash -n install && bash -n frontend/landing/public/install
- name: Install script copies are in sync
run: diff -q install frontend/landing/public/install
- name: Release scripts parse
# transpile-only: bundling would follow imports into third-party
# packages with exports quirks (giget via node-fetch-native)
run: |
for f in tooling/repo/*.ts; do
bun -e "new Bun.Transpiler({ loader: 'ts' }).transformSync(await Bun.file('$f').text())"
echo "OK $f"
done
actionlint:
name: Lint workflows
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: raven-actions/actionlint@3d39aea434753780c3b3d4a1a31c854b4dbf49d7 # v2