build(deps): bump github.com/nats-io/nats.go from 1.37.0 to 1.38.0 #650
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 Workflow | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Run 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: 1.21 | |
- name: Execute Tests | |
run: make test | |
lint: | |
name: Lint Code | |
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: 1.21 | |
- name: Run Linter | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.56.1 | |
check-exclusions: | |
name: Check Exclusions | |
runs-on: ubuntu-22.04 | |
outputs: | |
exclude_matrix: ${{ steps.determine-exclusions.outputs.exclude_matrix }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Determine Exclusions | |
id: determine-exclusions | |
run: | | |
if [[ -z "${{ github.event.before }}" || -z "${{ github.event.after }}" ]]; then | |
# Use base and head SHAs for the first PR commit. | |
base_sha="${{ github.event.pull_request.base.sha }}" | |
head_sha="${{ github.event.pull_request.head.sha }}" | |
else | |
# Use before and after SHAs for subsequent commits. | |
base_sha="${{ github.event.before }}" | |
head_sha="${{ github.event.after }}" | |
fi | |
exclude_matrix=$(bash ./scripts/determine_exclusions.sh "$base_sha" "$head_sha") | |
echo "exclude_matrix=${exclude_matrix}" >> $GITHUB_OUTPUT | |
build: | |
name: Build Docker Image - ${{ matrix.service }} | |
needs: | |
- test | |
- lint | |
- check-exclusions | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
service: | |
- index | |
- library | |
- validation | |
- dataproxy | |
- nodecleaner | |
- revalidatenode | |
- schemaparser | |
- dataproxyupdater | |
- dataproxyrefresher | |
- maintenance | |
exclude: ${{ fromJSON(needs.check-exclusions.outputs.exclude_matrix) }} | |
steps: | |
- name: Checkout Code | |
if: matrix.service != '' | |
uses: actions/checkout@v4 | |
- name: DockerHub Login | |
if: matrix.service != '' | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Publish Docker Image | |
if: matrix.service != '' | |
run: make docker-push-${{ matrix.service }} DEPLOY_ENV=pretest | |
deploy: | |
name: Deploy Services | |
needs: | |
- test | |
- lint | |
- check-exclusions | |
- build | |
runs-on: ubuntu-22.04 | |
env: | |
SERVER_IP: ${{ secrets.PRETEST_SERVER_IP }} | |
KUBECONFIG_PATH: ${{ secrets.KUBECONFIG_PATH }} | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
EXCLUDE_MATRIX: ${{ needs.check-exclusions.outputs.exclude_matrix }} | |
DEPLOY_ENV: pretest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup SSH and Deploy Services | |
run: ./scripts/deploy-services.sh | |
e2e_test: | |
name: E2E Test | |
needs: | |
- test | |
- lint | |
- check-exclusions | |
- build | |
- deploy | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Install Newman | |
run: | | |
npm install -g newman | |
- name: Test Index | |
run: > | |
./scripts/wait_for_timeout.sh | |
https://pretest-index.murmurations.network/v2/ping 200 300 | |
- name: Test Library | |
run: > | |
./scripts/wait_for_timeout.sh | |
https://pretest-library.murmurations.network/v2/ping 200 300 | |
- name: Test Data Proxy | |
run: > | |
./scripts/wait_for_timeout.sh | |
https://pretest-data-proxy.murmurations.network/v1/ping 200 300 | |
- name: Newman E2E Test | |
run: make newman-test DEPLOY_ENV=pretest |