diff --git a/.github/workflows/integ-reuseable-workflow.yml b/.github/workflows/integ-reuseable-workflow.yml new file mode 100644 index 000000000..7c667730d --- /dev/null +++ b/.github/workflows/integ-reuseable-workflow.yml @@ -0,0 +1,41 @@ +name: integ reusable workflow + +on: + workflow_call: + inputs: + test_name: + type: string + required: false +env: + GOVERSION: 1.20.7 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + - uses: actions/setup-go@v4 + with: + go-version: "${{ env.GOVERSION }}" + cache: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + - name: Docker Login + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io/getporter + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Configure Agent + run: go run mage.go build + shell: bash + - name: Integration Test + run: go test -v -timeout=10m -tags=integration ./tests/integration/"${{inputs.test_name}}"".go + shell: bash + \ No newline at end of file