Skip to content

fix: update nx dependencies to v17.0.3 #703

fix: update nx dependencies to v17.0.3

fix: update nx dependencies to v17.0.3 #703

Workflow file for this run

name: on branch push
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
outputs:
# Expose matched filters as job 'packages' output variable
libs: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
dfts-helper:
- 'libs/dfts-helper/**'
- '{package,nx,migrations,tsconfig.base}.json'
- 'pnpm-lock.yaml'
- '.github/**'
dfts-qrcode:
- 'libs/dfts-qrcode/**'
- '{package,nx,migrations,tsconfig.base}.json'
- 'pnpm-lock.yaml'
- '.github/**'
dfx-bootstrap-table:
- 'libs/dfx-bootstrap-table/**'
- '{package,nx,migrations,tsconfig.base}.json'
- 'pnpm-lock.yaml'
- '.github/**'
dfx-helper:
- 'libs/dfx-helper/**'
- '{package,nx,migrations,tsconfig.base}.json'
- 'pnpm-lock.yaml'
- '.github/**'
dfx-qrcode:
- 'libs/dfx-qrcode/**'
- '{package,nx,migrations,tsconfig.base}.json'
- 'pnpm-lock.yaml'
- '.github/**'
dfx-translate:
- 'libs/dfx-translate/**'
- '{package,nx,migrations,tsconfig.base}.json'
- 'pnpm-lock.yaml'
- '.github/**'
dfx-bootstrap-icons:
- 'libs/dfx-bootstrap-icons/**'
- '{package,nx,migrations,tsconfig.base}.json'
- 'pnpm-lock.yaml'
- '.github/**'
test:
name: Test ${{ matrix.lib }}
runs-on: ubuntu-latest
continue-on-error: true
needs: changes
if: ${{ needs.changes.outputs.libs != '[]' && needs.changes.outputs.libs != '' }}
strategy:
matrix:
lib: ${{ fromJSON(needs.changes.outputs.libs) }}
steps:
- uses: actions/checkout@v4
- name: setup node and pnpm
uses: dafnik/setup-node-pnpm@v2
with:
install-ignore-scripts: true
- name: test ${{ matrix.lib }}
run: pnpm exec nx test ${{ matrix.lib }} --configuration=ci --coverageReporters=cobertura --coverageDirectory="coverage/libs/${{ matrix.lib }}"
- name: setup coverage report
uses: ./.github/actions/setup-coverage-report
with:
path: coverage/libs/${{ matrix.lib }}/cobertura-coverage.xml
build-lib:
name: Build ${{ matrix.lib }}
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.libs != '[]' && needs.changes.outputs.libs != '' }}
strategy:
matrix:
lib: ${{ fromJSON(needs.changes.outputs.libs) }}
steps:
- uses: actions/checkout@v4
- name: setup node and pnpm
uses: dafnik/setup-node-pnpm@v2
with:
install-ignore-scripts: true
- name: build ${{ matrix.lib }}
run: pnpm exec nx build ${{ matrix.lib }}
- name: zip ${{ matrix.lib }}
run: cd ./dist/libs/ && zip -r "${{ matrix.lib }}.zip" ./${{ matrix.lib }} && cd -
- uses: actions/upload-artifact@v3
name: create ${{ matrix.lib }} artifact
with:
name: ${{ matrix.lib }}
path: ./dist/libs/${{ matrix.lib }}.zip
retention-days: 1
deploy-lib:
name: Deploy ${{ matrix.lib }} dev
needs: [ build-lib, test, changes ]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
strategy:
matrix:
lib: ${{ fromJSON(needs.changes.outputs.libs) }}
steps:
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.lib }}
path: ./dist
- name: dist lookup
run: cd dist && ls -la && cd -
- name: copy build to release server
uses: garygrossgarten/github-action-scp@release
with:
local: ./dist/${{ matrix.lib }}.zip
remote: /var/www/share/releases/${{ matrix.lib }}/${{ matrix.lib }}-dev.zip
host: ${{ secrets.RELEASES_SSH_HOST }}
port: ${{ secrets.RELEASES_SSH_PORT }}
username: ${{ secrets.RELEASES_SSH_USER }}
privateKey: ${{ secrets.RELEASES_SSH_PRIVATE_KEY }}
build-apps:
name: Build ${{ matrix.app }}
runs-on: ubuntu-latest
strategy:
matrix:
app: ['dfx-bootstrap-table-demo', 'dfx-bootstrap-icons-demo', 'dfx-qrcode-demo', 'playground']
steps:
- uses: actions/checkout@v4
- name: setup node and pnpm
uses: dafnik/setup-node-pnpm@v2
with:
install-ignore-scripts: true
- name: build ${{ matrix.app }}
run: pnpm exec nx build ${{ matrix.app }}
- name: zip ${{ matrix.app }}
run: cd ./dist/apps/ && zip -r "${{ matrix.app }}.zip" ./${{ matrix.app }} && cd -
- uses: actions/upload-artifact@v3
name: create ${{ matrix.app }} artifact
with:
name: ${{ matrix.app }}
path: ./dist/apps/${{ matrix.app }}.zip
retention-days: 1
bundle-apps:
name: Bundle app artifacts into one
needs: [ build-apps ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
name: Download table-demo
with:
name: dfx-bootstrap-table-demo
- uses: actions/download-artifact@v3
name: Download icons-demo
with:
name: dfx-bootstrap-icons-demo
- uses: actions/download-artifact@v3
name: Download qrcode-demo
with:
name: dfx-qrcode-demo
- uses: actions/download-artifact@v3
name: Download playground
with:
name: playground
- name: unzip all
run: |
unzip dfx-bootstrap-table-demo.zip
unzip dfx-bootstrap-icons-demo.zip
unzip dfx-qrcode-demo.zip
unzip playground.zip
- name: move files in place
run: |
mkdir dist
mv playground/* dist/
mv dfx-bootstrap-table-demo dist
mv dfx-bootstrap-icons-demo dist
mv dfx-qrcode-demo dist
- name: dist lookup
run: cd dist && ls -la && du -hs && cd -
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./dist/
retention-days: 1
deploy-apps:
if: github.ref == 'refs/heads/main'
name: Deploy apps
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: bundle-apps
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2