This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
[TT-12430] Sync should work with Dashboard using SQL database #92
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: Run tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
outputs: | |
latest-version: ${{ steps.get-latest-version.outputs.version }} | |
steps: | |
- name: Checkout Tyk Sync | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Setup Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.x | |
- name: Get latest version | |
id: get-latest-version | |
run: | | |
go build | |
version=$(./tyk-sync v) | |
echo "version=$version" | |
echo "version=$version" >> "$GITHUB_OUTPUT" | |
- name: Run unit tests | |
run: go test ./... | |
sbom: | |
uses: TykTechnologies/github-actions/.github/workflows/sbom.yaml@main | |
needs: run-tests | |
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | |
secrets: | |
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }} | |
DEPDASH_URL: ${{ secrets.DEPDASH_URL }} | |
DEPDASH_KEY: ${{ secrets.DEPDASH_KEY }} | |
ORG_GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }} | |
DOCKER_IMAGE: "tykio/tyk-sync:${{needs.run-tests.outputs.latest-version}}" |