Build & Test #536
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: Build & Test | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [build-test] | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} | |
GOPRIVATE: github.com/slingdata-io/* | |
jobs: | |
build-for-test: | |
if: "! (contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[bump]'))" | |
runs-on: [self-hosted, linux, ubuntu-20] | |
timeout-minutes: 15 | |
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.22" | |
cache: false | |
# - uses: actions/cache@v3 | |
# with: | |
# path: ~/go/pkg/mod | |
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
# restore-keys: | | |
# ${{ runner.os }}-go- | |
- name: Configure private token | |
run: | | |
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/" | |
- 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.test.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, ubuntu-20] | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: myrotvorets/set-commit-status-action@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
sha: ${{ github.sha }} | |
status: pending | |
- name: Configure Environment | |
uses: flarco/envkey-action@main | |
with: | |
envkey: ${{ secrets.ENVKEY }} | |
- name: Set up GoLang | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.22" | |
cache: false | |
- name: Configure private token | |
run: | | |
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/" | |
- name: Run Go Tests (sling) | |
run: | | |
export DEBUG='' | |
# Oracle env | |
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH | |
export PATH="$PATH:$ORACLE_HOME/bin" | |
bash scripts/prep.gomod.sh | |
bash scripts/test.sh | |
- name: Run Go Tests (dbio) | |
run: | | |
export DEBUG='' | |
# Oracle env | |
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH | |
export PATH="$PATH:$ORACLE_HOME/bin" | |
bash scripts/prep.gomod.sh | |
cd core/dbio | |
bash scripts/test.sh | |
- uses: myrotvorets/set-commit-status-action@master | |
if: always() | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
sha: ${{ github.sha }} | |
status: ${{ job.status }} |