Skip to content

🧪 Bruno rocks

🧪 Bruno rocks #95

Workflow file for this run

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