🧪 Bruno rocks #95
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: CI Pipeline | |
on: | |
push: | |
branches: ["main"] | |
paths-ignore: | |
- "etc/**" | |
- "api/**" | |
- "deploy/**" | |
- "scripts/**" | |
- "tests/**" | |
- ".vscode/**" | |
- "readme.md" | |
- "makefile" | |
pull_request: | |
branches: ["main"] | |
permissions: | |
packages: write | |
jobs: | |
lint-test: | |
name: Lint and run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install tools | |
run: make install-tools | |
- name: Linting & formatting | |
run: make lint | |
- name: Run unit tests | |
run: make test | |
- name: Run API integration tests | |
run: | | |
make run-all & | |
sleep 20 | |
cd api/bruno && .tools/node_modules/.bin/bru run --env local | |
- name: Check the build | |
run: make build | |
image-build: | |
name: Build and push images | |
if: github.ref == 'refs/heads/main' | |
env: | |
IMAGE_TAG: dev | |
VERSION: dev | |
BUILD_INFO: "CI build, SHA:${{ github.sha }}" | |
runs-on: ubuntu-latest | |
needs: lint-test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build images | |
run: make images | |
- name: Push images | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u USERNAME --password-stdin | |
make push |