Fix typo in comment #100
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
| # Runs linting and tests on the latest version of the code | |
| # This workflow uses self-hosted runners | |
| name: Lint and Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**.go' | |
| - '**.ts' | |
| workflow_call: | |
| inputs: | |
| build: | |
| type: string | |
| default: 'true' | |
| required: false | |
| description: "Boolean flag to disable build process if triggered by a release" | |
| workflow_dispatch: | |
| jobs: | |
| # Linters | |
| lint-frontend: | |
| runs-on: thevickypedia-default | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: "frontend/package.json" | |
| dest: ${{ runner.temp }}/setup-pnpm-${{ github.job }}-${{ github.run_id }} | |
| - run: make lint-frontend | |
| shell: bash | |
| # Avoid running linters on Windows (False positives for CRLF sequence) | |
| # https://github.com/golangci/golangci-lint/issues/635 | |
| # https://github.com/golangci/golangci-lint/issues/580 | |
| lint-backend: | |
| runs-on: [ thevickypedia-default, posix ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - run: make lint-backend | |
| shell: bash | |
| lint: | |
| runs-on: thevickypedia-default | |
| needs: [lint-frontend, lint-backend] | |
| steps: | |
| - run: echo "Finished Linting" | |
| # Tests | |
| test-frontend: | |
| runs-on: thevickypedia-default | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: "frontend/package.json" | |
| dest: ${{ runner.temp }}/setup-pnpm-${{ github.job }}-${{ github.run_id }} | |
| - run: make test-frontend | |
| shell: bash | |
| test-backend: | |
| runs-on: thevickypedia-default | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - run: make test-backend | |
| shell: bash | |
| test: | |
| runs-on: thevickypedia-default | |
| needs: [test-frontend, test-backend] | |
| steps: | |
| - run: echo "Finished Testing" | |
| # Build | |
| # IMPORTANT: frontend can be built in parallel, since the build output doesn't matter | |
| build-frontend: | |
| if: github.event_name == 'push' || inputs.build == 'true' | |
| runs-on: thevickypedia-default | |
| needs: [lint, test] | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: "frontend/package.json" | |
| dest: ${{ runner.temp }}/setup-pnpm-${{ github.job }}-${{ github.run_id }} | |
| - run: make build-frontend | |
| shell: bash | |
| build-backend: | |
| if: github.event_name == 'push' || inputs.build == 'true' | |
| runs-on: thevickypedia-default | |
| needs: [lint, test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - run: make build-backend | |
| shell: bash | |
| build: | |
| if: github.event_name == 'push' || inputs.build == 'true' | |
| runs-on: thevickypedia-default | |
| needs: [build-frontend, build-backend] | |
| steps: | |
| - run: echo "Finished Building" |