Skip to content

Commit

Permalink
Fix/add_concurency_for_storybook (#2755)
Browse files Browse the repository at this point in the history
* fix: concurency

* chore: test

* fix: change region

* fix: remove python MIME type detection

* fix: test mime function

* fix: small typo

* fix: typo

* feat: add concurency for all workflows

* fix: add concurency

* fix: try to deploy on macos

* fix: remove test deploy

* fix: rewrite sync stage

* fix: remove test trigger

* fix: remove delete step
  • Loading branch information
stepanLav authored Nov 28, 2024
1 parent 4582e0e commit c60ed9f
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- 'main'
- 'dev'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-build:
runs-on: ${{ matrix.os }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build_stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
types: [labeled]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CSC_FOR_PULL_REQUEST: true
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Lint code
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/deploy_storybook.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: Deploy storybook to bucket

on:
push:
branches:
- dev

concurrency:
group: "storybook-deploy"
cancel-in-progress: false

env:
S3_BUCKET: s3://spektr-storybook
S3_BUCKET: s3://storybook
S3_REGION: pl-waw

jobs:
deploy-to-bucket:
runs-on: ubuntu-latest
runs-on: macos-14

steps:
- name: Checkout
Expand All @@ -26,7 +30,7 @@ jobs:
- name: 🤌 Upload to s3
uses: ./.github/workflows/upload-to-s3
with:
s3_region: nl-ams
s3_region: ${{ env.S3_REGION }}
s3_access_key: ${{ secrets.S3_ACCESS_KEY }}
s3_secret_key: ${{ secrets.S3_SECRET_KEY }}
s3_bucket: ${{ env.S3_BUCKET }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/global_coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- 'scripts/**'
- 'tests/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
JEST_COVERAGE_AUTH: ${{ secrets.PAT_GIST_TOKEN }}
GIST_ID: 77132f25d05c7e9264cd410aef162a7e
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integration_test_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
integration_test_run:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
paths:
- 'tests/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CI: true

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Run unit tests
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
pull-requests: write
checks: write
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/update_chains_file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
schedule:
- cron: '0 8 * * 1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
update-files:
runs-on: ubuntu-latest
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/upload-to-s3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ runs:
shell: bash

- name: Interact with object storage
run: |
base_directory="${{ inputs.source }}"
find "$base_directory" -type f | while read -r file; do
relative_path="${file#$base_directory/}" # Extract the relative path
s3cmd sync "$file" "${{ inputs.s3_bucket }}/${relative_path}" --acl-public
done
run: s3cmd sync "${{ inputs.source }}/" "${{ inputs.s3_bucket }}/" --acl-public
shell: bash

0 comments on commit c60ed9f

Please sign in to comment.