|
29 | 29 | validate: |
30 | 30 | runs-on: ubuntu-latest |
31 | 31 | env: |
32 | | - GOVER: 1.21 |
33 | | - GOOS: linux |
34 | | - GOARCH: amd64 |
35 | | - GOPROXY: https://proxy.golang.org |
36 | | - DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install/install.sh |
37 | | - DAPR_CLI_REF: ${{ github.event.inputs.daprcli_commit }} |
38 | | - DAPR_REF: ${{ github.event.inputs.daprdapr_commit }} |
39 | 32 | CHECKOUT_REPO: ${{ github.repository }} |
40 | 33 | CHECKOUT_REF: ${{ github.ref }} |
41 | 34 |
|
|
50 | 43 | if [ ${{ github.event.client_payload.command }} = "ok-to-test" ]; then |
51 | 44 | echo "CHECKOUT_REPO=${{ github.event.client_payload.pull_head_repo }}" >> $GITHUB_ENV |
52 | 45 | echo "CHECKOUT_REF=${{ github.event.client_payload.pull_head_ref }}" >> $GITHUB_ENV |
53 | | - echo "DAPR_REF=master" >> $GITHUB_ENV |
54 | 46 | fi |
55 | 47 |
|
56 | 48 | - name: Check out code onto GOPATH |
@@ -96,61 +88,21 @@ jobs: |
96 | 88 | python -m pip install --upgrade pip |
97 | 89 | pip install setuptools wheel twine tox |
98 | 90 | - name: Set up Dapr CLI |
99 | | - run: | |
100 | | - wget -q "https://github.com/dapr/cli/releases/download/v${{ env.DAPR_CLI_VER }}/dapr_${{ env.GOOS }}_${{ env.GOARCH }}.tar.gz" -O /tmp/dapr.tar.gz |
101 | | - sudo tar xzf /tmp/dapr.tar.gz -C /usr/local/bin dapr |
102 | | - dapr --version |
103 | | - - name: Set up Go ${{ env.GOVER }} |
104 | | - if: env.DAPR_REF != '' || env.DAPR_CLI_REF != '' |
105 | | - uses: actions/setup-go@v6 |
| 91 | + uses: dapr/.github/.github/actions/setup-dapr-cli@main |
| 92 | + with: |
| 93 | + commit: ${{ github.event.inputs.daprcli_commit }} |
| 94 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 95 | + - name: Set up Dapr runtime |
| 96 | + uses: dapr/.github/.github/actions/setup-dapr-runtime@main |
106 | 97 | with: |
107 | | - go-version: ${{ env.GOVER }} |
| 98 | + commit: ${{ github.event.inputs.daprdapr_commit }} |
| 99 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
108 | 100 | - name: Set up Llama |
109 | 101 | run: | |
110 | 102 | curl -fsSL https://ollama.com/install.sh | sh |
111 | 103 | nohup ollama serve & |
112 | 104 | sleep 10 |
113 | 105 | ollama pull llama3.2:latest |
114 | | - - name: Checkout Dapr CLI repo to override dapr command. |
115 | | - uses: actions/checkout@v6 |
116 | | - if: env.DAPR_CLI_REF != '' |
117 | | - with: |
118 | | - repository: dapr/cli |
119 | | - ref: ${{ env.DAPR_CLI_REF }} |
120 | | - path: cli |
121 | | - - name: Checkout Dapr repo to override daprd. |
122 | | - uses: actions/checkout@v6 |
123 | | - if: env.DAPR_REF != '' |
124 | | - with: |
125 | | - repository: dapr/dapr |
126 | | - ref: ${{ env.DAPR_REF }} |
127 | | - path: dapr_runtime |
128 | | - - name: Build and override dapr cli with referenced commit. |
129 | | - if: env.DAPR_CLI_REF != '' |
130 | | - run: | |
131 | | - cd cli |
132 | | - make |
133 | | - sudo cp dist/linux_amd64/release/dapr /usr/local/bin/dapr |
134 | | - cd .. |
135 | | - - name: Initialize Dapr runtime ${{ env.DAPR_RUNTIME_VER }} |
136 | | - run: | |
137 | | - dapr uninstall --all |
138 | | - dapr init --runtime-version ${{ env.DAPR_RUNTIME_VER }} |
139 | | - - name: Build and override daprd with referenced commit. |
140 | | - if: env.DAPR_REF != '' |
141 | | - run: | |
142 | | - cd dapr_runtime |
143 | | - make |
144 | | - mkdir -p $HOME/.dapr/bin/ |
145 | | - cp dist/linux_amd64/release/daprd $HOME/.dapr/bin/daprd |
146 | | - cd .. |
147 | | - - name: Override placement service. |
148 | | - if: env.DAPR_REF != '' |
149 | | - run: | |
150 | | - docker stop dapr_placement |
151 | | - cd dapr_runtime |
152 | | - ./dist/linux_amd64/release/placement --healthz-port 9091 & |
153 | | - cd .. |
154 | 106 | - name: Check examples |
155 | 107 | run: | |
156 | 108 | tox -e examples |
|
0 commit comments