Skip to content

Commit

Permalink
Merge branch 'main' into feat/make-us-seo-compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
NoamGaash authored Jan 3, 2025
2 parents 35c886e + 2bb56ee commit 6cb4c7e
Show file tree
Hide file tree
Showing 57 changed files with 15,588 additions and 2,865 deletions.
82 changes: 82 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,88 @@
"contributions": [
"code"
]
},
{
"login": "TomRytt",
"name": "Tom Rytt",
"avatar_url": "https://avatars.githubusercontent.com/u/86921461?v=4",
"profile": "https://github.com/TomRytt",
"contributions": [
"code"
]
},
{
"login": "griseduardo",
"name": "Eduardo Henrique Gris",
"avatar_url": "https://avatars.githubusercontent.com/u/34499486?v=4",
"profile": "https://github.com/griseduardo",
"contributions": [
"code"
]
},
{
"login": "YaelChen",
"name": "Yael Chen",
"avatar_url": "https://avatars.githubusercontent.com/u/51058584?v=4",
"profile": "https://github.com/YaelChen",
"contributions": [
"code",
"test"
]
},
{
"login": "LeoBonjo",
"name": "Leo Green",
"avatar_url": "https://avatars.githubusercontent.com/u/139697327?v=4",
"profile": "https://github.com/LeoBonjo",
"contributions": [
"code"
]
},
{
"login": "yontank",
"name": "Yehonatan Avrahimi",
"avatar_url": "https://avatars.githubusercontent.com/u/48332126?v=4",
"profile": "https://github.com/yontank",
"contributions": [
"code"
]
},
{
"login": "Tami-Co",
"name": "Tami-Co",
"avatar_url": "https://avatars.githubusercontent.com/u/158340919?v=4",
"profile": "https://github.com/Tami-Co",
"contributions": [
"code"
]
},
{
"login": "rivka14",
"name": "Rivka Weiss",
"avatar_url": "https://avatars.githubusercontent.com/u/85113156?v=4",
"profile": "https://github.com/rivka14",
"contributions": [
"code"
]
},
{
"login": "EstherKal",
"name": "EstherKalsmith",
"avatar_url": "https://avatars.githubusercontent.com/u/160218199?v=4",
"profile": "https://github.com/EstherKal",
"contributions": [
"code"
]
},
{
"login": "ofirc77",
"name": "ofirc77",
"avatar_url": "https://avatars.githubusercontent.com/u/170853216?v=4",
"profile": "https://github.com/ofirc77",
"contributions": [
"code"
]
}
]
}
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
reviewers:
- "aviv1620"
open-pull-requests-limit: 3
17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ jobs:
with:
node-version: 18
cache: 'npm'
- name: Get Commit Hash and generate Version File
run: echo "$(git rev-parse --short HEAD)" >> public/hash.txt
- name: Run install
run: npm ci
- name: Build
run: npm run build
- name: upload artifact
uses: actions/upload-artifact@v2
- name: Upload artifact (build)
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-build
path: dist

build-storybook:
runs-on: ubuntu-latest
steps:
Expand All @@ -31,11 +34,11 @@ jobs:
run: npm ci
- name: Build Storybook
run: npm run build-storybook -- -o dist/storybook
- name: upload artifact
uses: actions/upload-artifact@v2
- name: Upload artifact (storybook)
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
name: dist-storybook
path: dist/storybook

- name: Save PR number
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/complaint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
working-directory: src/complaint
- run: npm run docker:run
working-directory: src/complaint
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-trace
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ env:
jobs:
test-with-coverage:
runs-on: ubuntu-22.04
env:
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download artifact
uses: dawidd6/action-download-artifact@v2

- name: Download dist-build artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: 'Build'
workflow_conclusion: success
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ github.event.workflow_run.id }}
run_number: ${{ github.event.workflow_run.run_number }}
name: dist
path: dist
name: dist-build
path: .

- name: Download dist-storybook artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: 'Build'
workflow_conclusion: success
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ github.event.workflow_run.id }}
run_number: ${{ github.event.workflow_run.run_number }}
name: dist-storybook
path: storybook

- name: Download pr number
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: 'Build'
workflow_conclusion: success
Expand All @@ -29,22 +42,25 @@ jobs:
run_number: ${{ github.event.workflow_run.run_number }}
name: pr_number
path: .

- name: Read PR number
id: read-pr
run: |
pr_number=$(cat pr_number)
echo "PR_NUMBER=${pr_number}" >> $GITHUB_ENV
- uses: shallwefootball/s3-upload-action@master
name: Upload preview to S3
if: always()
id: s3-trace
continue-on-error: true
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: noam-gaash.co.il
source_dir: dist
source_dir: . # Upload the root directory
destination_dir: ${{ github.event.workflow_run.id }}/open-bus/${{ github.event.workflow_run.run_number }}

- name: find comment
uses: peter-evans/find-comment@v1
if: env.PR_NUMBER
Expand All @@ -53,6 +69,7 @@ jobs:
issue-number: ${{ env.PR_NUMBER }}
comment-author: 'github-actions[bot]'
body-includes: 'Preview'

- name: update comment
uses: peter-evans/create-or-update-comment@v1
if: steps.fc.outputs.comment-id
Expand All @@ -62,6 +79,8 @@ jobs:
body: |
Preview: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.event.workflow_run.id }}/open-bus/${{ github.event.workflow_run.run_number }}/index.html
Preview Storybook: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.event.workflow_run.id }}/open-bus/${{ github.event.workflow_run.run_number }}/storybook/index.html
Test Report (if available): 'https://s3.amazonaws.com/noam-gaash.co.il/${{ github.event.workflow_run.id }}/open-bus/${{ github.event.workflow_run.head_sha }}/test-results/index.html'
- name: create comment
uses: peter-evans/create-or-update-comment@v1
if: steps.fc.outputs.comment-id == ''
Expand All @@ -70,3 +89,4 @@ jobs:
body: |
Preview: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.event.workflow_run.id }}/open-bus/${{ github.event.workflow_run.run_number }}/index.html
Preview Storybook: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.event.workflow_run.id }}/open-bus/${{ github.event.workflow_run.run_number }}/storybook/index.html
Test Report (if available): 'https://s3.amazonaws.com/noam-gaash.co.il/${{ github.event.workflow_run.id }}/open-bus/${{ github.event.workflow_run.head_sha }}/test-results/index.html'
38 changes: 26 additions & 12 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
tags: ${{ env.DOCKER_APP_IMAGE_NAME }}:${{ env.DOCKER_APP_IMAGE_TAG }}
outputs: type=docker, dest=/tmp/docker-image.tar
- name: Save Docker image
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: docker-image
path: /tmp/docker-image.tar
Expand All @@ -64,9 +64,11 @@ jobs:
needs: build
env:
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
APPLITOOLS_LOG_DIR: ./logs
APPLITOOLS_SHOW_LOGS: true
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docker-image
path: /tmp
Expand All @@ -85,18 +87,30 @@ jobs:
- run: npx playwright install
- name: Run test
run: npm test
- name: upload playwright artifacts
- name: Run Storybook tests
if: env.APPLITOOLS_API_KEY
run: npx -y @applitools/eyes-storybook --storybook-url http://localhost:3000/storybook/index.html
- name: Prepare playwright artifact directory
if: always()
uses: actions/upload-artifact@v2
run: |
mkdir -p playwright-artifact
cp -r test-results/* playwright-artifact/
cp -r playwright-report/* playwright-artifact/
- name: upload combined playwright artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright
path: test-results
- name: upload report
path: playwright-artifact
- name: upload logs if exists
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: playwright
path: playwright-report
name: logs
path: logs
if-no-files-found: warn


publish-test-results:
runs-on: ubuntu-latest
needs: test
Expand All @@ -105,7 +119,7 @@ jobs:
AWS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: playwright
path: test-results
Expand All @@ -126,8 +140,8 @@ jobs:
with:
sha: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
description: 'Test results: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/test-results/index.html'
status: success
description: 'Playwright html report with traces'
status: ${{needs.test.result}}
context: 'Test results'
targetUrl: 'https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}/test-results/index.html'
build-outside-docker:
Expand Down
Loading

0 comments on commit 6cb4c7e

Please sign in to comment.