Skip to content

columns map, ordered stream #337

columns map, ordered stream

columns map, ordered stream #337

Workflow file for this run

name: Bump, Build & Test
on:
workflow_dispatch:
repository_dispatch:
types: [build-test]
push:
branches:
- main
jobs:
bump:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
new_version: ${{ steps.tag_version.outputs.new_version }}
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ github.event.inputs.tag }}
build-for-test:
if: "! (contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[bump]'))"
runs-on: [self-hosted, linux]
timeout-minutes: 15
needs: [bump]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}
- name: Set up GoLang
uses: actions/setup-go@v3
with:
go-version: "1.19"
cache: false
# - uses: actions/cache@v3
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
- name: Build
env:
# VERSION: ${{ steps.get_version.outputs.VERSION }}
# VERSION: ${{ github.event.client_payload.version }}
VERSION: ${{ needs.bump.outputs.new_version }}
REF_NAME: ${{ github.ref_name }}
run: |
echo "VERSION -> $VERSION"
echo "REF_NAME -> $REF_NAME"
bash scripts/prep.gomod.sh
bash scripts/build.linux.sh $VERSION
test:
if: "! (contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[no test]') || contains(github.event.head_commit.message, '[nt]') || contains(github.event.head_commit.message, '[bump]'))"
needs: [build-for-test]
runs-on: [self-hosted, linux]
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Set up GoLang
uses: actions/setup-go@v3
with:
go-version: "1.19"
cache: false
# - uses: actions/cache@v3
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
- name: Run Go Tests
env:
ENVKEY: ${{ secrets.ENVKEY }}
run: |
/__/bin/envkey-source -f > .env.sh
sed -i "s/_DEBUG='TRUE'/_DEBUG=''/g" .env.sh
docker run -i --rm -v /__/docker-data/devbox/root/go:/root/go -v /__:/__ -v $PWD:/work --workdir /work flarco/devbox:base bash -c "source .env.sh && bash scripts/prep.gomod.sh && bash scripts/test.sh"