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

ci: upgrade to new actions #547

Merged
merged 2 commits into from
Oct 3, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/auto-add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: taiga-family/ci/actions/setup-project@1.16.0
- uses: taiga-family/ci/actions/setup/project@1.20.0
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
4 changes: 2 additions & 2 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
pull-requests: write
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/variables@1.16.0
- uses: taiga-family/ci/actions/two-approve@1.16.0
- uses: taiga-family/ci/actions/setup/variables@1.20.0
- uses: taiga-family/ci/actions/auto/approve/double@1.20.0
if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true'
with:
token1: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]

- name: Auto assign
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: toshimaru/[email protected]
if: env.IS_OWNER_MODE == 'true'
uses: toshimaru/[email protected]
with:
repo-token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
4 changes: 2 additions & 2 deletions .github/workflows/auto-cleanup-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/cleanup-cache@1.16.0
- uses: taiga-family/ci/actions/auto/cleanup-cache@1.20.0
if: github.event_name == 'push'
with:
branch-name: ${{ github.head_ref || github.ref_name }}
- uses: taiga-family/ci/actions/cleanup-cache@1.16.0
- uses: taiga-family/ci/actions/auto/cleanup-cache@1.20.0
if: github.event_name == 'pull_request'
with:
branch-name: refs/pull/${{ github.event.pull_request.number }}/merge
2 changes: 1 addition & 1 deletion .github/workflows/auto-dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/dependency-review@1.16.0
- uses: taiga-family/ci/actions/security/dependency-review@1.20.0
4 changes: 2 additions & 2 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/variables@1.16.0
- uses: taiga-family/ci/actions/label-when-approved@1.16.0
- uses: taiga-family/ci/actions/setup/variables@1.20.0
- uses: taiga-family/ci/actions/auto/label-when-approved@1.20.0
with:
approvals: 1
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/auto-remove-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/auto-remove-label@1.16.0
- uses: taiga-family/ci/actions/auto/remove-label@1.20.0
14 changes: 4 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Build packages
run: npx nx run-many --target build --all --exclude=demo
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npx nx run-many --target build --all --exclude=demo

build-demo:
name: Demo
if: ${{ !contains(github.head_ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Build demo application for Github Pages
run: npx nx build-gh-pages
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npx nx build-gh-pages

concurrency:
group: build-${{ github.head_ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
persist-credentials: false
ref: ${{ github.head_ref }}
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
- uses: taiga-family/ci/actions/setup-node@1.16.0
- uses: taiga-family/ci/actions/setup-git@1.16.0
- uses: taiga-family/ci/actions/setup/node@1.20.0
- uses: taiga-family/ci/actions/setup/config/git@1.20.0
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run build

- name: Debug output
run: tree dist/demo/browser -P '*.html'

- name: Deploy preview
uses: FirebaseExtended/action-hosting-deploy@v0
- uses: FirebaseExtended/action-hosting-deploy@v0
continue-on-error: true
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Build demo
run: npx nx build-gh-pages

- name: Deploy
uses: JamesIves/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npx nx build-gh-pages
- uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist/demo/browser
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
with:
fetch-depth: 10

- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]

- name: Mark demo-app directory for persist in cache
uses: actions/cache@v3
Expand All @@ -44,8 +43,7 @@ jobs:
name: Kit / ${{ matrix.project }}
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]

- name: Download demo build from cache
uses: actions/cache@v3
Expand All @@ -70,8 +68,7 @@ jobs:
name: Recipes
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]

- name: Download demo build from cache
uses: actions/cache@v3
Expand All @@ -94,8 +91,7 @@ jobs:
name: Others
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]

- name: Download demo build from cache
uses: actions/cache@v3
Expand Down
63 changes: 16 additions & 47 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,92 +6,61 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Typecheck
run: npm run typecheck
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run typecheck

cspell:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Run cspell
run: npm run cspell -- --no-progress
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run cspell -- --no-progress

prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup global variables
uses: taiga-family/ci/actions/[email protected]

- uses: taiga-family/ci/actions/setup/[email protected]
- uses: actions/[email protected]
if: env.SUPPORT_AUTO_PUSH == 'true'
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Run prettier
run: npm run prettier ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --write' || '-- --check' }}

- name: Apply changes after linting
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run prettier ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --write' || '-- --check' }}
- uses: taiga-family/ci/actions/auto/[email protected]
if: env.SUPPORT_AUTO_PUSH == 'true'
uses: taiga-family/ci/actions/[email protected]

stylelint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup global variables
uses: taiga-family/ci/actions/[email protected]

- uses: taiga-family/ci/actions/setup/[email protected]
- uses: actions/[email protected]
if: env.SUPPORT_AUTO_PUSH == 'true'
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Run stylelint
run: npm run stylelint ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --fix' || '' }}

- name: Apply changes after linting
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run stylelint ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --fix' || '' }}
- uses: taiga-family/ci/actions/auto/[email protected]
if: env.SUPPORT_AUTO_PUSH == 'true'
uses: taiga-family/ci/actions/[email protected]

eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup global variables
uses: taiga-family/ci/actions/[email protected]

uses: taiga-family/ci/actions/setup/[email protected]
- uses: actions/[email protected]
if: env.SUPPORT_AUTO_PUSH == 'true'
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Run eslint
run: npm run lint ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --fix' || '' }}

- name: Apply changes after linting
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run lint ${{ env.SUPPORT_AUTO_PUSH == 'true' && '-- --fix' || '' }}
- uses: taiga-family/ci/actions/auto/[email protected]
if: env.SUPPORT_AUTO_PUSH == 'true'
uses: taiga-family/ci/actions/[email protected]

concurrency:
group: lint-${{ github.workflow }}-${{ github.ref }}
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npx nx run-many --target build --all --exclude=demo
- run: npx nx run-many --target publish --all --exclude=demo

- name: Build publishable libraries
run: npx nx run-many --target build --all --exclude=demo
- id: info
run: |
echo "version=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Publish libraries
run: npx nx run-many --target publish --all --exclude=demo
- name: Announce to Telegram
uses: taiga-family/ci/actions/messenger/telegram/[email protected]
with:
chatId: ${{ secrets.TAIGA_TELEGRAM_CHAT_ID }}
topicId: ${{ secrets.TAIGA_TELEGRAM_CHAT_THREAD_ID }}
token: ${{ secrets.TAIGA_TELEGRAM_BOT_TOKEN }}
version: ${{ steps.info.outputs.version }}

concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Node.js and Cache
uses: taiga-family/ci/actions/[email protected]

- name: Run tests
run: npx nx run-many --target test --all --coverage

- uses: taiga-family/ci/actions/setup/[email protected]
- run: npx nx run-many --target test --all --coverage
- uses: codecov/[email protected]
with:
directory: ./coverage/core/
flags: summary,core
name: core

- uses: codecov/[email protected]
with:
directory: ./coverage/kit/
flags: summary,kit
name: kit

- uses: codecov/[email protected]
with:
directory: ./coverage/angular/
Expand Down