Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Merge pull request #2 from BillotP/delegators_stats #15

Merge pull request #2 from BillotP/delegators_stats

Merge pull request #2 from BillotP/delegators_stats #15

Workflow file for this run

name: Continuous Integration
on:
push:
jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Run unit tests
run: |
make testdb
make test | tee -a out.txt
cat out.txt >> $GITHUB_STEP_SUMMARY
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build_containers:
# environment:
# name: ${{ github.ref_name }}
# url: "${{ vars.DEPLOY_URL }}"
needs: [tests]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
cmd: ["api", "importer", "delegationz"]
steps:
- uses: actions/checkout@v3
- name: Login to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# ## Build and push to container registry
- uses: docker/setup-buildx-action@v2
- name: Get frontend app for delegationz cmd
if: ${{ matrix.cmd == 'delegationz' }}
run: |
download_url=$(curl -s https://api.github.com/repos/billotp/dlgz_app/releases/latest | jq -r '.assets[0].browser_download_url')
wget "$download_url" -O build.zip
unzip -u build.zip -d pkg/frontend/build
- uses: docker/build-push-action@v3
with:
context: .
push: true
build-args: |
cmd=${{ matrix.cmd }}
version=${{ env.VERSION_ARG }}
file: golang.dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/billotp/delegationz/${{ matrix.cmd}}:${{ github.ref_name }}