Merge pull request #892 from 7474/unit-tests/unit-cmd-20260324-13da6c… #1507
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SRC#DataViewer CI/CD | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - .github/workflows/azure-static-web-apps-icy-coast-005428600.yml | |
| - SRC.Sharp/** | |
| pull_request: | |
| types: [opened, synchronize, reopened, closed] | |
| branches: | |
| - master | |
| paths: | |
| - .github/workflows/azure-static-web-apps-icy-coast-005428600.yml | |
| - SRC.Sharp/** | |
| jobs: | |
| build_and_deploy_job: | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') | |
| runs-on: ubuntu-latest | |
| name: Build and Deploy Job | |
| environment: | |
| name: ${{ (github.event_name == 'push' && 'SRC#DataViewer') || 'SRC#DataViewer dev' }} | |
| url: ${{ (github.event_name == 'push' && 'https://srcv.7474.jp/') || steps.builddeploy.outputs.static_web_app_url }} | |
| outputs: | |
| static_web_app_url: ${{ steps.builddeploy.outputs.static_web_app_url }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Build And Deploy | |
| id: builddeploy | |
| uses: Azure/static-web-apps-deploy@v1 | |
| with: | |
| azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_COAST_005428600 }} | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| action: 'upload' | |
| app_location: 'SRC.Sharp/SRCTestBlazor/' | |
| api_location: '' | |
| output_location: 'wwwroot' | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: build_and_deploy_job | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - run: npm ci | |
| working-directory: ./SRC.Sharp/SRCTestBlazor/E2E | |
| - name: Percy exec Cypress run | |
| uses: percy/exec-action@v0.3.1 | |
| with: | |
| working-directory: ./SRC.Sharp/SRCTestBlazor/E2E | |
| command: 'cypress run --record' | |
| env: | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CYPRESS_BASE_URL: ${{ needs.build_and_deploy_job.outputs.static_web_app_url }} | |
| close_pull_request_job: | |
| if: github.event_name == 'pull_request' && github.event.action == 'closed' | |
| runs-on: ubuntu-latest | |
| name: Close Pull Request Job | |
| environment: | |
| name: 'SRC#DataViewer dev' | |
| url: '' | |
| steps: | |
| - name: Close Pull Request | |
| id: closepullrequest | |
| uses: Azure/static-web-apps-deploy@v1 | |
| with: | |
| azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_COAST_005428600 }} | |
| action: 'close' |