-
Notifications
You must be signed in to change notification settings - Fork 37
149 lines (127 loc) · 4.62 KB
/
Copy pathci.yml
File metadata and controls
149 lines (127 loc) · 4.62 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
run-name: ${{ github.actor }} CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
ref:
description: Branch to run against
default: dev
push:
branches: [dev]
pull_request:
branches: [dev]
merge_group:
branches: [dev]
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
ref: ${{ inputs.ref || github.ref }}
- uses: ./.github/actions/free-disk-space
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d
with:
extra-conf: |
accept-flake-config = true
- name: Cache Nix store
uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4
- name: Moon CI pipeline (affected)
run: nix develop --command moon ci --base=origin/${{ github.base_ref || 'dev' }}
env:
MOON_OUTPUT_STYLE: buffer-only-failure
MOON_LOG: error
- uses: moonrepo/run-report-action@bbe7e99bf2aca819ec660ec01fc59d84bdd492d6
if: success() || failure()
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check if extension e2e reports exist
id: e2e-report
if: ${{ !cancelled() }}
run: |
if [ -d "apps/extension/allure-results" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
fi
- name: (allure-report) Load test report history
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
if: ${{ steps.e2e-report.outputs.exists == 'true' && !cancelled() }}
continue-on-error: true
with:
ref: gh-test
path: gh-test
fetch-depth: 1
- name: (allure-report) Build test report
uses: simple-elf/allure-report-action@e463a472d3b1d750f9544369d60589ff1964c820
if: ${{ steps.e2e-report.outputs.exists == 'true' && !cancelled() }}
with:
gh_pages: gh-test
allure_history: gh-test
allure_results: apps/extension/allure-results
- name: (allure-report) Upload test report to action artifacts
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1
if: ${{ steps.e2e-report.outputs.exists == 'true' && !cancelled() }}
with:
name: extension-e2e-tests-allure-report
path: allure-report/
retention-days: 30
- name: (cucumber-report) Upload test report to action artifacts
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1
if: ${{ steps.e2e-report.outputs.exists == 'true' && !cancelled() }}
with:
name: extension-e2e-tests-cucumber-report
path: apps/extension/cucumber-report/
retention-days: 30
docs-test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 1
ref: ${{ inputs.ref || github.ref }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d
with:
extra-conf: |
accept-flake-config = true
- name: Cache Nix store
uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4
- name: Run tests
run: nix develop --command sh -c "cd docs && mdbook test"
docs-deploy:
if: github.event_name != 'pull_request'
needs: docs-test
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 1
ref: ${{ inputs.ref || github.ref }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d
with:
extra-conf: |
accept-flake-config = true
- name: Cache Nix store
uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4
- name: Build docs
run: nix develop --command sh -c "cd docs && mdbook build"
- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
publish_branch: gh-pages
force_orphan: true