generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
192 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"projects": {}, | ||
"targets": { | ||
"taiga-editor": { | ||
"hosting": { | ||
"taiga-editor": [ | ||
"taiga-editor" | ||
], | ||
"taiga-editor-e2e-report": [ | ||
"taiga-editor-e2e-report" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
name: ⚙️ Build demo | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 🤖 Cleanup resources after close PR | ||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
purge-cache: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
BRANCH: refs/pull/${{ github.event.number }}/merge | ||
steps: | ||
- uses: actions/[email protected] | ||
continue-on-error: true | ||
- run: | | ||
gh cache list --ref $BRANCH > cache.log && cat cache.log | ||
for cacheId in $(gh cache list --ref $BRANCH --json id | jq -r .[].id); do | ||
echo "> gh cache delete $cacheId" | ||
gh cache delete $cacheId | ||
done | ||
delete-firebase-channel: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: w9jds/[email protected] | ||
continue-on-error: true | ||
with: | ||
args: hosting:channel:delete pr${{ github.event.number }}-${{ github.head_ref }} --force | ||
env: | ||
GCP_SA_KEY: ${{ secrets.FIREBASE_TAIGA_PREVIEWS_SA }} | ||
PROJECT_ID: taiga-editor |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
branches: [main] | ||
|
||
jobs: | ||
deploy: | ||
prod: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
11 changes: 5 additions & 6 deletions
11
.github/workflows/deploy-preview.yml → .github/workflows/deploy-staging.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
name: 🚀 Deploy / preview | ||
name: 🚀 Deploy | ||
on: pull_request | ||
|
||
jobs: | ||
build_and_preview: | ||
name: Firebase | ||
staging: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
- run: npx nx build editor-demo | ||
- name: Deploy preview | ||
uses: FirebaseExtended/action-hosting-deploy@v0 | ||
- uses: FirebaseExtended/[email protected] | ||
continue-on-error: true | ||
if: ${{ env.IS_FORK == 'false' && env.IS_DEPENDABOT == 'false' }} | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TUI_EDITOR }} | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
projectId: taiga-editor | ||
target: taiga-editor | ||
expires: 1d | ||
|
||
concurrency: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ jobs: | |
e2e: | ||
name: E2E | ||
runs-on: ubuntu-latest | ||
env: | ||
PW_RESULT: ./projects/demo-playwright/tests-results | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
|
@@ -32,22 +34,45 @@ jobs: | |
- run: npx nx e2e editor-demo-playwright | ||
continue-on-error: true | ||
|
||
- uses: actions/[email protected] | ||
- run: tree ${{ env.PW_RESULT }} | ||
- name: Deploy e2e report | ||
id: e2e-report | ||
uses: FirebaseExtended/[email protected] | ||
continue-on-error: true | ||
with: | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TUI_EDITOR }} | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
target: taiga-editor-e2e-report | ||
projectId: taiga-editor | ||
disableComment: 'true' | ||
expires: 1d | ||
|
||
- name: Upload artifacts / ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }} | ||
uses: actions/[email protected] | ||
id: artifact | ||
with: | ||
path: ./projects/demo-playwright/tests-results/**/*-diff.png | ||
path: ${{ env.PW_RESULT }}/**/*-retry2/*-diff.png | ||
name: ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }} | ||
if-no-files-found: ignore | ||
compression-level: 0 | ||
retention-days: 1 | ||
|
||
- id: diff-checker | ||
- name: Check if diff-output exists | ||
id: diff_checker | ||
run: | | ||
echo "diff_exist=$(find ./projects/demo-playwright/tests-results -regex '.*diff\.png$' | wc -l | sed -e 's/^[[:space:]]*//')" >> $GITHUB_OUTPUT | ||
- if: ${{ steps.diff-checker.outputs.diff_exist != '0' }} | ||
echo "diff_exist=$(find ${{ env.PW_RESULT }} -path '*retry2/*' -iname '*-diff.png' | wc -l | sed -e 's/^[[:space:]]*//')" >> $GITHUB_OUTPUT | ||
- name: Fall with an error if diff-output exists | ||
if: ${{ steps.diff_checker.outputs.diff_exist != '0' }} | ||
run: | | ||
find ./projects/demo-playwright/tests-results -regex '.*diff\.png$' -exec echo "{}" \; | ||
find ${{ env.PW_RESULT }} -path '*retry2/*' -iname '*-diff.png' -exec echo "{}" \; | ||
exit 1 | ||
- uses: daun/[email protected] | ||
if: always() | ||
with: | ||
custom-info: 'For more information, [see our report](${{ steps.e2e-report.outputs.details_url }})' | ||
report-file: ${{ env.PW_RESULT }}/test-results.json | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
|
||
# misc | ||
/coverage | ||
test-results.json | ||
*.log | ||
|
||
# System Files | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
{ | ||
"hosting": { | ||
"public": "dist/demo/browser", | ||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
} | ||
"$schema": "https://raw.githubusercontent.com/firebase/firebase-tools/master/schema/firebase-config.json", | ||
"hosting": [ | ||
{ | ||
"target": "taiga-editor", | ||
"public": "dist/demo/browser", | ||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
}, | ||
{ | ||
"target": "taiga-editor-e2e-report", | ||
"public": "projects/demo-playwright/tests-report", | ||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.