-
Notifications
You must be signed in to change notification settings - Fork 5
139 lines (115 loc) · 3.1 KB
/
Copy pathbuild.yml
File metadata and controls
139 lines (115 loc) · 3.1 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
name: Build
on:
workflow_dispatch:
push:
branches: main
pull_request:
branches: '*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
env:
VITE_ENABLE_TASKS: true
VITE_ENABLE_SSH_KEYS: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: false
manifest-path: pyproject.toml
- name: Install dependencies
shell: bash
run: |
set -eux
pixi run dev-install
- name: Lint
if: matrix.os == 'ubuntu-latest'
run: |
set -eux
pixi run node-prettier-check && pixi run node-eslint-check
- name: Test the frontend
shell: bash
run: |
set -eux
pixi run test-frontend
- name: Test the backend
shell: bash
run: |
set -eux
pixi run test-backend
- name: Build the frontend
shell: bash
run: |
set -eux
pixi run node-build
- name: Package the app
if: matrix.os == 'ubuntu-latest'
run: |
set -eux
pixi run pypi-build
- name: Upload package to GH
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/fileglancer*
if-no-files-found: error
integration-tests:
name: Integration tests
runs-on: ubuntu-latest
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
VITE_ENABLE_TASKS: true
VITE_ENABLE_SSH_KEYS: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.65.0
cache: false
manifest-path: pyproject.toml
- name: Install dependencies
run: |
pixi run dev-install
pixi run node-install-ui-tests
- name: Install browser
run: npx playwright install chromium
working-directory: frontend/ui-tests
- name: Set up browser cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('frontend/ui-tests/yarn.lock') }}
- name: Execute integration tests
run: |
pixi run test-ui
- name: Upload Playwright Test report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: fileglancer-playwright-tests
path: |
frontend/ui-tests/test-results
frontend/ui-tests/playwright-report
check_links:
name: Check README links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1