Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: removed internal release process doc #38

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/workflows/test-pr-details.yml

This file was deleted.

52 changes: 47 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ concurrency:
env:
GITHUB_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
IS_DEV: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/development' }}
REPOSITORY: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}
jobs:
test-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Format
Expand All @@ -35,6 +37,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Lint
Expand All @@ -50,6 +53,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Style Lint All
Expand All @@ -65,6 +69,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: TsConfig Paths
Expand All @@ -81,6 +86,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Unit Tests
Expand All @@ -94,10 +100,41 @@ jobs:
affectedCmd: npx nx affected:test
isDev: ${{ env.IS_DEV }}

# Job for checking if we should run other jobs with specific conditions.
# This is usefull for forked repos where secrets are not available.
# Checking if specific secret is available to determine if we should run and also a type of event.
set-env:
runs-on: ubuntu-latest
outputs:
should-run-pr: ${{ steps.set-env.outputs.should-run-pr }}
should-run-push: ${{ steps.set-env.outputs.should-run-push }}
should-run-regression: ${{ steps.set-env.outputs.should-run-regression }}
steps:
- name: Set should-run for PR
id: set-env
run: |
echo "CHROMATIC_PROJECT_TOKEN=${{ secrets.CHROMATIC_PROJECT_TOKEN }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comments

echo "SCOS_BASE_URL=${{ secrets.SCOS_BASE_URL }}"
if [ -n "${{ secrets.SCOS_BASE_URL }}" ]; then
echo "::set-output name=should-run-regression::true"
else
echo "::set-output name=should-run-regression::false"
fi
if [ "${{ github.event_name }}" = "pull_request" ] && [ -n "${{ secrets.CHROMATIC_PROJECT_TOKEN }}" ]; then
echo "::set-output name=should-run-pr::true"
else
echo "::set-output name=should-run-pr::false"
fi
if [ "${{ github.event_name }}" = "push" ] && [ -n "${{ secrets.CHROMATIC_PROJECT_TOKEN }}" ]; then
echo "::set-output name=should-run-push::true"
else
echo "::set-output name=should-run-push::false"
fi

test-visual-pr:
runs-on: ubuntu-latest
needs: [test-format, test-lint, test-stylelint, test-tsconfig]
if: ${{ github.event_name == 'pull_request' }}
needs: [test-format, test-lint, test-stylelint, test-tsconfig, set-env]
if: needs.set-env.outputs.should-run-pr == 'true'
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -113,12 +150,13 @@ jobs:

test-visual-dev:
runs-on: ubuntu-latest
needs: [test-format, test-lint, test-stylelint, test-tsconfig]
if: ${{ github.event_name == 'push' }}
needs: [test-format, test-lint, test-stylelint, test-tsconfig, set-env]
if: needs.set-env.outputs.should-run-push == 'true'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Visual Regression Tests
Expand All @@ -140,6 +178,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Storefront E2E Tests
Expand All @@ -156,11 +195,13 @@ jobs:

test-storefront-visual-regression:
runs-on: ubuntu-latest
needs: [test-format, test-lint, test-stylelint, test-tsconfig]
needs: [test-format, test-lint, test-stylelint, test-tsconfig, set-env]
if: needs.set-env.outputs.should-run-regression == 'true'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Storefront B2C visual regression tests
Expand All @@ -183,6 +224,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_REF }}
repository: ${{ env.REPOSITORY }}
fetch-depth: 0
- uses: ./.github/actions/init
- name: Build
Expand Down
37 changes: 0 additions & 37 deletions docs/internal/release/release-process.md

This file was deleted.

Loading