Skip to content

Commit

Permalink
Merge pull request #38 from tolerants/remove-release-process-doc
Browse files Browse the repository at this point in the history
chore: removed internal release process doc
  • Loading branch information
tolerants authored Jun 20, 2024
2 parents 344e83e + e946a28 commit a7cd512
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 70 deletions.
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 }}"
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.

0 comments on commit a7cd512

Please sign in to comment.