Skip to content

Commit 1b8bac8

Browse files
authored
feat: merge ga
2 parents e0017e9 + 81d4e2b commit 1b8bac8

File tree

1,453 files changed

+126609
-20505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,453 files changed

+126609
-20505
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
Before filing this issue, please ensure you're using the latest CLI by running `swa --version` and comparing to the latest version on [npm](https://www.npmjs.com/package/@azure/static-web-apps-cli).
1110

1211
**Are you accessing the CLI from the default port `:4280` ?**
12+
1313
- [ ] No, I am using a different port number (--port) and accessing the CLI from that port
1414
- [ ] Yes, I am accessing the CLI from port `:4280`
1515

1616
> Make sure you are accessing the URL printed in the console when running!
1717
18-
1918
**Describe the bug**
2019
A clear and concise description of what the bug is.
2120

2221
**To Reproduce**
2322
Steps to reproduce the behavior:
23+
2424
1. Go to '...'
2525
2. Type in command 'swa ...'
2626
3. Click on '....'
@@ -34,10 +34,10 @@ A clear and concise description of what you expected to happen.
3434
If applicable, add screenshots to help explain your problem.
3535

3636
**Desktop (please complete the following information):**
37-
- OS: [e.g. iOS]
38-
- Browser [e.g. chrome, safari]
39-
- Version [e.g. 22]
4037

38+
- OS: [e.g. iOS]
39+
- Browser [e.g. chrome, safari]
40+
- Version [e.g. 22]
4141

4242
**Additional context**
4343
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/codeql/codeql-config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "CodeQL config"
2+
3+
paths-ignore:
4+
- e2e/samples
5+
- e2e/fixtures
6+
- cypress/fixtures

.github/workflows/ci.yml

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: CI
5+
6+
on:
7+
push:
8+
branches: [main, ga]
9+
pull_request:
10+
branches: [main, ga]
11+
12+
jobs:
13+
14+
format:
15+
runs-on: ubuntu-20.04
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v1
19+
with:
20+
node-version: 16.x
21+
22+
- run: npm ci
23+
- run: npm run format
24+
25+
test-macos:
26+
needs: [format]
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
matrix:
30+
os: [macos-latest]
31+
node-version: [14.x, 15.x, 16.x, 17.x, '>= 18.x']
32+
33+
name: "test: use node ${{ matrix.node-version }}"
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Use Node.js ${{ matrix.node-version }}
37+
uses: actions/setup-node@v1
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
41+
- name: Cache node modules
42+
uses: actions/cache@v2
43+
env:
44+
cache-name: cache-node-modules-${{ matrix.os }}-${{ matrix.node-version }}
45+
with:
46+
path: ~/.npm
47+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
48+
restore-keys: |
49+
${{ runner.os }}-build-${{ env.cache-name }}-
50+
51+
- name: "npm test"
52+
run: |
53+
npm ci
54+
npm test
55+
56+
e2e-deploy-macos:
57+
needs: [test-macos]
58+
runs-on: ${{ matrix.os }}
59+
strategy:
60+
matrix:
61+
os: [macos-latest]
62+
node-version: [14.x, 15.x, 16.x, 17.x, '>= 18.x']
63+
64+
name: "deploy: use node ${{ matrix.node-version }}"
65+
steps:
66+
- uses: actions/checkout@v2
67+
- name: Use Node.js ${{ matrix.node-version }}
68+
uses: actions/setup-node@v1
69+
with:
70+
node-version: ${{ matrix.node-version }}
71+
72+
- name: Cache node modules
73+
uses: actions/cache@v2
74+
env:
75+
cache-name: cache-node-modules-${{ matrix.os }}-${{ matrix.node-version }}
76+
with:
77+
path: ~/.npm
78+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
79+
restore-keys: |
80+
${{ runner.os }}-build-${{ env.cache-name }}-
81+
82+
- name: "swa deploy"
83+
run: |
84+
npm ci
85+
npm link
86+
cd cypress/fixtures/
87+
swa deploy app --dry-run --verbose=silly --api-location=./static/api --app-location ./static --deployment-token=00000000000000000000000000000000000000000000000000000000000000000-00000000-0000-0000-0000-00000000000000000000
88+
89+
test-windows:
90+
needs: [format]
91+
runs-on: ${{ matrix.os }}
92+
strategy:
93+
matrix:
94+
os: [windows-latest]
95+
node-version: [14.x, 15.x, 16.x, 17.x, '>= 18.x']
96+
97+
name: "test: use node ${{ matrix.node-version }}"
98+
steps:
99+
- uses: actions/checkout@v2
100+
- name: Use Node.js ${{ matrix.node-version }}
101+
uses: actions/setup-node@v1
102+
with:
103+
node-version: ${{ matrix.node-version }}
104+
105+
- name: Cache node modules
106+
uses: actions/cache@v2
107+
env:
108+
cache-name: cache-node-modules-${{ matrix.os }}-${{ matrix.node-version }}
109+
with:
110+
path: ~/.npm
111+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
112+
restore-keys: |
113+
${{ runner.os }}-build-${{ env.cache-name }}-
114+
115+
- name: "npm test"
116+
run: |
117+
npm ci
118+
npm test -- --maxWorkers=1
119+
120+
e2e-deploy-windows:
121+
needs: [test-windows]
122+
runs-on: ${{ matrix.os }}
123+
strategy:
124+
matrix:
125+
os: [windows-latest]
126+
node-version: [14.x, 15.x, 16.x, 17.x, '>= 18.x']
127+
128+
name: "deploy: use node ${{ matrix.node-version }}"
129+
steps:
130+
- uses: actions/checkout@v2
131+
- name: Use Node.js ${{ matrix.node-version }}
132+
uses: actions/setup-node@v1
133+
with:
134+
node-version: ${{ matrix.node-version }}
135+
136+
- name: Cache node modules
137+
uses: actions/cache@v2
138+
env:
139+
cache-name: cache-node-modules-${{ matrix.os }}-${{ matrix.node-version }}
140+
with:
141+
path: ~/.npm
142+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
143+
restore-keys: |
144+
${{ runner.os }}-build-${{ env.cache-name }}-
145+
146+
- name: "swa deploy"
147+
run: |
148+
npm ci
149+
npm link
150+
cd cypress/fixtures/
151+
swa deploy app --dry-run --verbose=silly --api-location=./static/api --app-location ./static --deployment-token=00000000000000000000000000000000000000000000000000000000000000000-00000000-0000-0000-0000-00000000000000000000
152+
153+
test-linux:
154+
needs: [format]
155+
runs-on: ${{ matrix.os }}
156+
strategy:
157+
matrix:
158+
os: [ubuntu-20.04]
159+
node-version: [14.x, 15.x, 16.x, 17.x, '>= 18.x']
160+
161+
name: "test: use node ${{ matrix.node-version }}"
162+
steps:
163+
- uses: actions/checkout@v2
164+
- name: Use Node.js ${{ matrix.node-version }}
165+
uses: actions/setup-node@v1
166+
with:
167+
node-version: ${{ matrix.node-version }}
168+
169+
- name: Cache node modules
170+
uses: actions/cache@v2
171+
env:
172+
cache-name: cache-node-modules-${{ matrix.os }}-${{ matrix.node-version }}
173+
with:
174+
path: ~/.npm
175+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
176+
restore-keys: |
177+
${{ runner.os }}-build-${{ env.cache-name }}-
178+
179+
- name: "npm test"
180+
run: |
181+
npm ci
182+
npm test
183+
184+
e2e-deploy-linux:
185+
needs: [test-linux]
186+
runs-on: ${{ matrix.os }}
187+
strategy:
188+
matrix:
189+
os: [ubuntu-20.04]
190+
node-version: [14.x, 15.x, 16.x, 17.x, '>= 18.x']
191+
192+
name: "deploy: use node ${{ matrix.node-version }}"
193+
steps:
194+
- uses: actions/checkout@v2
195+
- name: Use Node.js ${{ matrix.node-version }}
196+
uses: actions/setup-node@v1
197+
with:
198+
node-version: ${{ matrix.node-version }}
199+
200+
- name: Cache node modules
201+
uses: actions/cache@v2
202+
env:
203+
cache-name: cache-node-modules-${{ matrix.os }}-${{ matrix.node-version }}
204+
with:
205+
path: ~/.npm
206+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
207+
restore-keys: |
208+
${{ runner.os }}-build-${{ env.cache-name }}-
209+
210+
- name: "swa deploy"
211+
run: |
212+
npm ci
213+
npm link
214+
cd cypress/fixtures/
215+
swa deploy app --dry-run --verbose=silly --api-location=./static/api --app-location ./static --deployment-token=00000000000000000000000000000000000000000000000000000000000000000-00000000-0000-0000-0000-00000000000000000000
216+
217+
package:
218+
needs: [e2e-deploy-macos, e2e-deploy-linux, e2e-deploy-windows]
219+
runs-on: ubuntu-20.04
220+
221+
steps:
222+
- uses: actions/checkout@v2
223+
- uses: actions/setup-node@v1
224+
with:
225+
node-version: 16.x
226+
227+
- run: npm ci
228+
- run: npm version prerelease --preid=ci-$GITHUB_RUN_ID --no-git-tag-version
229+
- run: npm pack
230+
- name: Upload
231+
uses: actions/upload-artifact@v2
232+
with:
233+
name: static-web-apps-cli
234+
path: "*.tgz"

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main ]
16+
branches: [ main, ga ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ main ]
19+
branches: [ main, ga ]
2020
schedule:
2121
- cron: '32 19 * * 2'
2222

@@ -39,8 +39,9 @@ jobs:
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
42+
uses: github/codeql-action/init@v2
4343
with:
44+
config-file: ./.github/codeql/codeql-config.yml
4445
languages: ${{ matrix.language }}
4546
# If you wish to specify custom queries, you can do so here or in a config file.
4647
# By default, queries listed here will override any specified in a config file.
@@ -50,7 +51,7 @@ jobs:
5051
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5152
# If this step fails, then you should remove it and run the build manually (see below)
5253
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
54+
uses: github/codeql-action/autobuild@v2
5455

5556
# ℹ️ Command-line programs to run using the OS shell.
5657
# 📚 https://git.io/JvXDl
@@ -64,4 +65,4 @@ jobs:
6465
# make release
6566

6667
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
68+
uses: github/codeql-action/analyze@v2

.github/workflows/deploy-docs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy CLI docs
2+
on:
3+
push:
4+
branches: [ga] # TODO: update to main after GA
5+
6+
jobs:
7+
build_and_deploy_job:
8+
runs-on: ubuntu-latest
9+
name: Build and Deploy Job
10+
steps:
11+
- uses: actions/checkout@v2
12+
- run: git config --global user.email "[email protected]"
13+
- run: git config --global user.name "Wassim Chegham"
14+
- name: Setup Node.js environment
15+
uses: actions/[email protected]
16+
with:
17+
node-version: '16.x'
18+
- name: "deploy docs"
19+
run: |
20+
cd docs/www/
21+
npm ci
22+
npm run deploy
23+
env:
24+
GIT_PASS: ${{ secrets.SWA_CLI_DEPLOY_DOCS_GH_PAGES }}
25+
GIT_USER: "manekinekko"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: E2E Tests for framework detection
2+
on:
3+
push:
4+
branches: [main, ga]
5+
6+
jobs:
7+
detection-e2e-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: 14.x
14+
- name: Test framework detection
15+
run: |
16+
npm ci
17+
npm run e2e:detection:test

0 commit comments

Comments
 (0)