MPT-16714 Update docker-compose and use make (#182) #16
This file contains hidden or 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 build and merge | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "release/**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Build test containers" | |
| run: make build | |
| - name: "Create environment file" | |
| run: env | grep -E '^MPT_' > .env | |
| env: | |
| RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }} | |
| RP_API_KEY: ${{ secrets.RP_API_KEY }} | |
| MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }} | |
| MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }} | |
| MPT_API_TOKEN_CLIENT: ${{ secrets.MPT_API_TOKEN_CLIENT }} | |
| MPT_API_TOKEN_OPERATIONS: ${{ secrets.MPT_API_TOKEN_OPERATIONS }} | |
| MPT_API_TOKEN_VENDOR: ${{ secrets.MPT_API_TOKEN_VENDOR }} | |
| - name: "Run validation & test" | |
| run: make check-all | |
| - name: "Run E2E test" | |
| run: make e2e args="--reportportal --rp-launch=$RP_LAUNCH --rp-api-key=$RP_API_KEY --rp-endpoint=$RP_ENDPOINT" | |
| env: | |
| RP_LAUNCH: github-e2e-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_number }} | |
| RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }} | |
| RP_API_KEY: ${{ secrets.RP_API_KEY }} | |
| - name: "Run SonarCloud Scan" | |
| uses: SonarSource/sonarqube-scan-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| - name: "Stop containers" | |
| if: always() | |
| run: make down |