Add bulk folder deletion from the files grid (#26886) #35
This file contains hidden or 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
| name: Check | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: check-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=6144 | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v47 | |
| - name: Prepare | |
| uses: ./.github/actions/prepare | |
| with: | |
| build: false | |
| - name: Run Linter | |
| run: pnpm exec eslint ${{ steps.changed-files.outputs.all_changed_files }} | |
| stylelint: | |
| name: Stylelint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v47 | |
| - name: Prepare | |
| uses: ./.github/actions/prepare | |
| with: | |
| build: false | |
| - name: Run Stylelinter | |
| run: pnpm exec stylelint ${{ steps.changed-files.outputs.all_changed_files }} --allow-empty-input | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v47 | |
| - name: Prepare | |
| uses: ./.github/actions/prepare | |
| with: | |
| build: false | |
| - name: Run Formatter | |
| run: pnpm exec prettier --check --ignore-unknown ${{ steps.changed-files.outputs.all_changed_files }} | |
| unit: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| # This currently builds all packages in the repo. Ideally we add build: false here as well | |
| # to save minutes building the repo, but that'd require us refactoring the tests to stop | |
| # using @directus/* packages within tests | |
| - name: Prepare | |
| uses: ./.github/actions/prepare | |
| - name: Run Tests | |
| run: pnpm test:coverage --passWithNoTests | |
| - name: Upload coverage to Codecov | |
| run: | | |
| # Download and install Codecov uploader | |
| curl -Os https://cli.codecov.io/latest/linux/codecov | |
| chmod +x codecov | |
| # Find all coverage files and upload them with flags based on folder names | |
| find . -name "coverage-final.json" -path "*/coverage/*" | while read -r coverage_file; do | |
| # Extract the folder name that contains the coverage directory | |
| folder_name=$(echo "$coverage_file" | sed -E 's|.*/(.*)/coverage/.*|\1|') | |
| echo "Uploading coverage for $folder_name from $coverage_file" | |
| # Upload to codecov with folder name as flag | |
| ./codecov upload-coverage -f "$coverage_file" -F "$folder_name" -Z --disable-search | |
| done |