Skip to content

fix: renterd no recommendations #1753

fix: renterd no recommendations

fix: renterd no recommendations #1753

Workflow file for this run

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.21.7
- 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
test-e2e:
runs-on: ubuntu-latest
# Only run one test-e2e job at a time because they mutate the same data
concurrency: test-e2e
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.21.7
# 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: Install playwright deps for e2e
shell: bash
run: npx playwright install-deps
- name: Test e2e
shell: bash
run: npx nx affected --target=e2e --parallel=5
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
RENTERD_E2E_TEST_API_URL: ${{ secrets.RENTERD_E2E_TEST_API_URL }}
RENTERD_E2E_TEST_API_PASSWORD: ${{ secrets.RENTERD_E2E_TEST_API_PASSWORD }}
HOSTD_E2E_TEST_API_URL: ${{ secrets.HOSTD_E2E_TEST_API_URL }}
HOSTD_E2E_TEST_API_PASSWORD: ${{ secrets.HOSTD_E2E_TEST_API_PASSWORD }}
WALLETD_E2E_TEST_API_URL: ${{ secrets.WALLETD_E2E_TEST_API_URL }}
WALLETD_E2E_TEST_API_PASSWORD: ${{ secrets.WALLETD_E2E_TEST_API_PASSWORD }}
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playwright-report
path: |
apps/renterd-e2e/output/
apps/hostd-e2e/output/
apps/walletd-e2e/output/
retention-days: 3
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.21.7
- 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: ./...