Update file: pipeline-library-go.yml #124
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
# This workflow is generated and will be automatically synchronized. | |
# Source: https://github.com/stimtech/infra-workflows/blob/main/pipeline-library-go.yml | |
name: Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
configuration: | |
name: Gather configuration | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
outputs: | |
action_config: ${{ steps.action_config.outputs.data }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Read STIM action configuration | |
id: action_config | |
run: | | |
if [[ -f ".github/stim-pipeline.json" ]]; then | |
echo data=$(cat .github/stim-pipeline.json) >> $GITHUB_OUTPUT | |
else | |
echo data={} >> $GITHUB_OUTPUT | |
fi | |
go-analyze: | |
name: Analyze Go | |
needs: configuration | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Analyze Go | |
uses: stimtech/action-go-analyze@v5 | |
with: | |
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
gh_credentials: ${{ secrets.GIT_CREDENTIALS }} | |
integration-test: | |
name: Integration tests | |
needs: configuration | |
if: fromJSON(needs.configuration.outputs.action_config).actions.action-go-integration-test.enable | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run integration tests | |
uses: stimtech/action-go-integration-test@v4 | |
with: | |
gh_credentials: ${{ secrets.GIT_CREDENTIALS }} | |
bitbucket_credentials: ${{ secrets.BITBUCKET_GIT_CREDENTIALS }} | |
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
pipeline-complete: | |
name: Pipeline Complete | |
needs: | |
- configuration | |
- go-analyze | |
- integration-test | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pipeline Complete | |
uses: stimtech/action-pipeline-complete@v2 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
secrets: ${{ toJSON(secrets) }} | |
needs_context: ${{ toJSON(needs) }} | |
notify: false |