Merge pull request #2827 from freqtrade/dependabot/github_actions/mai… #8153
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: FreqUI CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - ci/** | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: [ published ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build and Test FreqUI | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04 ] | |
| node: [ "20", "22", "24", "25"] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - name: Run Lint | |
| run: pnpm run lint-ci | |
| - name: Run type check | |
| run: pnpm run typecheck | |
| - name: Run Tests | |
| run: pnpm run test:unit | |
| - name: Build build | |
| run: pnpm run build | |
| - name: Archive artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| # Ideally this would upload the zip file from below - but this action currently does not support this. | |
| with: | |
| name: freqUI-${{ matrix.node }} | |
| path: | | |
| dist | |
| !dist/**/*.map | |
| retention-days: 10 | |
| # Playwright section | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install --with-deps | |
| - name: Run Playwright tests | |
| run: pnpm exec playwright test | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report-${{ matrix.node }} | |
| path: playwright-report/ | |
| retention-days: 30 | |
| # End Playwright section | |
| release: | |
| name: Upload Release Binaries | |
| runs-on: "ubuntu-latest" | |
| if: github.event_name == 'release' | |
| needs: build | |
| permissions: | |
| contents: write # Needed to upload release assets. | |
| steps: | |
| - name: Download digests | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| path: ./dist/ | |
| # Use node-22 build. | |
| name: freqUI-22 | |
| - name: Zip files for release | |
| run: | | |
| cd dist/ | |
| zip -r ../freqUI.zip . | |
| cd ../ | |
| - name: Upload release binaries | |
| uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 # 0.4.1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| asset_paths: '["./freqUI.zip"]' | |
| call-docker-workflow: | |
| needs: build | |
| if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/frequi' | |
| uses: ./.github/workflows/docker.yml | |
| permissions: | |
| packages: write # Needed to push Docker images to ghcr. | |
| contents: read | |
| secrets: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} |