-
Notifications
You must be signed in to change notification settings - Fork 37
129 lines (111 loc) · 4.05 KB
/
Copy pathci.yml
File metadata and controls
129 lines (111 loc) · 4.05 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
name: ci
run-name: ${{ github.actor }} CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
ref: ${{ inputs.ref || github.ref }}
- uses: ./.github/actions/free-disk-space
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25
with:
extra-conf: |
accept-flake-config = true
- name: Cache Nix store
uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4
continue-on-error: true
- name: Moon CI pipeline (affected)
run: nix develop --command moon ci --base=${{ github.event.before || format('origin/{0}', 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
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@53ebb757a2097edc77c53ecef4d454fc2f2f774c
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-deploy:
if: github.event_name != 'pull_request'
needs: ci
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 1
ref: ${{ inputs.ref || github.ref }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25
with:
extra-conf: |
accept-flake-config = true
- name: Cache Nix store
uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4
continue-on-error: true
- name: Build docs
run: nix develop --command moon run docs: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