chore: resolve various warnings #2164
Workflow file for this run
This file contains 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: PR | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
# cancel previous runs when the PR is updated | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }} | |
steps: | |
- name: Checkout all commits | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Full setup required since building the JS SDK requires Go | |
- name: Setup | |
uses: ./.github/actions/setup-all | |
with: | |
node_version: 20.10.0 | |
go_version: 1.23.0 | |
- name: Commit lint | |
shell: bash | |
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} | |
- name: Lint TypeScript | |
shell: bash | |
run: npx nx affected --target=lint --parallel=5 | |
# The SDK is referenced via dist in the tsconfig.base.json | |
# because the next executor does not actually support | |
# buildLibsFromSource=false | |
# With this configuration NX does not build the SDK as expected | |
# when it is an app dependency | |
- name: Force build SDK | |
shell: bash | |
run: npx nx run sdk:build | |
- name: Test TypeScript | |
shell: bash | |
run: npx nx affected --target=test --parallel=5 | |
- name: Build | |
shell: bash | |
run: npx nx affected --target=build --configuration=production --parallel=5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
- name: Export | |
shell: bash | |
# issue with parallelism | |
run: npx nx affected --target=build --configuration=export --parallel=5 | |
e2e: | |
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }} | |
uses: ./.github/workflows/e2e.yml | |
secrets: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
test-go: | |
# Run matrix since Go modules are used across all platforms | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
module: [./renterd, ./hostd, ./walletd] | |
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }} | |
steps: | |
- name: Checkout all commits | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Git | |
uses: ./.github/actions/setup-git | |
# Only Go setup is necessary for running Go tests | |
- name: Setup Go | |
uses: ./.github/actions/setup-go | |
with: | |
go_version: 1.23.0 | |
- name: Lint Go | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
working-directory: ${{ matrix.module }} | |
skip-cache: true | |
- name: Test Go | |
uses: n8maninger/action-golang-test@v2 | |
with: | |
args: '-race' | |
working-directory: ${{ matrix.module }} | |
package: ./... |