Skip to content

Commit e06e13d

Browse files
authored
Update azure-static-web-apps-icy-dune-08280a403.yml
run test in ci
1 parent 5e99658 commit e06e13d

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

.github/workflows/azure-static-web-apps-icy-dune-08280a403.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,55 @@ on:
1010
- main
1111

1212
jobs:
13-
build_and_deploy_job:
13+
build_and_test_job:
1414
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
1515
runs-on: ubuntu-latest
16-
name: Build and Deploy Job
16+
name: Build and Test Job
17+
1718
steps:
1819
- uses: actions/checkout@v3
1920
with:
2021
submodules: true
2122
lfs: false
22-
- name: Build And Deploy
23-
id: builddeploy
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: '18'
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build app
33+
run: npm run build
34+
35+
- name: Run Cypress E2E tests
36+
run: npx start-server-and-test preview http://localhost:4173 cy:run
37+
38+
deploy_job:
39+
name: Deploy to Azure Static Web Apps
40+
needs: build_and_test_job
41+
runs-on: ubuntu-latest
42+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
43+
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- name: Deploy
2448
uses: Azure/static-web-apps-deploy@v1
2549
with:
2650
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_DUNE_08280A403 }}
27-
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
51+
repo_token: ${{ secrets.GITHUB_TOKEN }}
2852
action: "upload"
29-
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
30-
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
31-
app_location: "/" # App source code path
32-
api_location: "" # Api source code path - optional
33-
output_location: "dist" # Built app content directory - optional
34-
###### End of Repository/Build Configurations ######
53+
app_location: "/"
54+
api_location: ""
55+
output_location: "dist"
3556

3657
close_pull_request_job:
3758
if: github.event_name == 'pull_request' && github.event.action == 'closed'
3859
runs-on: ubuntu-latest
3960
name: Close Pull Request Job
61+
4062
steps:
4163
- name: Close Pull Request
4264
id: closepullrequest

0 commit comments

Comments
 (0)