Tests #2514
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "client/scripts/ci" | |
| - "client/scripts/minio" | |
| - ".github/workflows/tests.yml" | |
| - "**/*.go" | |
| - go.mod | |
| schedule: | |
| - cron: "0 8 * * *" | |
| pull_request: | |
| repository_dispatch: | |
| types: [tests] | |
| workflow_dispatch: | |
| env: | |
| TASK_X_REMOTE_TASKFILES: 1 | |
| jobs: | |
| unit_server: | |
| name: Tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: server/go.mod | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gpg | |
| - name: Set up git config | |
| run: task --yes ci:setup:git-config | |
| - name: Install 3p-git-signatures | |
| run: task --yes ci:install:3p-git-signatures | |
| - name: Install ginkgo | |
| run: task --yes deps:install:ginkgo | |
| - name: Test | |
| run: | | |
| task --yes server:test:unit | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit_coverage | |
| path: tests_coverage | |
| e2e_tests: | |
| name: End-to-end tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: e2e/go.mod | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up prebuilt trdl test binary | |
| run: | | |
| task --yes client:build-with-coverage | |
| echo TRDL_TEST_BINARY_PATH=$GITHUB_WORKSPACE/bin/coverage/trdl >> $GITHUB_ENV | |
| echo TRDL_TEST_COVERAGE_DIR=$GITHUB_WORKSPACE/tests_coverage/e2e >> $GITHUB_ENV | |
| - name: Set up git config | |
| run: task --yes ci:setup:git-config | |
| - name: Prepare environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gpg | |
| - name: Install 3p-git-signatures | |
| run: task --yes ci:install:3p-git-signatures | |
| - name: Install ginkgo | |
| run: task --yes -p deps:install:ginkgo | |
| - name: Setup vault | |
| run: | | |
| task --yes server:setup-vault-local | |
| echo "$HOME/bin" >> $GITHUB_PATH | |
| - name: Test | |
| run: task --yes e2e:test:e2e | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e_coverage | |
| path: tests_coverage | |
| upload_coverage: | |
| name: Upload coverage | |
| needs: | |
| - unit_server | |
| - e2e_tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: tests_coverage | |
| - name: Upload coverage report | |
| uses: qltysh/qlty-action/coverage@v1 | |
| with: | |
| token: ${{secrets.QLTY_COVERAGE_TOKEN}} | |
| files: tests_coverage/**/*.out | |
| skip-errors: false | |
| notification: | |
| name: Notification | |
| if: always() | |
| needs: | |
| - unit_server | |
| - e2e_tests | |
| - upload_coverage | |
| uses: werf/common-ci/.github/workflows/notification.yml@main | |
| secrets: | |
| loopNotificationGroup: ${{ secrets.LOOP_NOTIFICATION_GROUP }} | |
| webhook: ${{ secrets.LOOP_NOTIFICATION_WEBHOOK }} | |
| notificationChannel: ${{ secrets.LOOP_NOTIFICATION_CHANNEL }} |