Skip to content

test

test #10

Workflow file for this run

#Github actions demo
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# This workflow contains a single job called "build"
jobs:
# The build job runs on an ubuntu-latest machine
build:
runs-on: self-hosted
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Check for test
run: |
if [ -f src/main/kotlin/util/BarcodeUtilTest.kt ]; then
echo "Barcode util test found!"
else
echo "Test script not found" > error.txt
ls -l
exit 1
fi
continue-on-error: true
- name: Prepare environment
run: |
if [ -f error.txt ]; then
echo "Found error!"
exit 1
else
kotlinc src/main/kotlin/util/BarcodeUtilTest.kt -include-runtime -d BarcodeUtilTest.jar
kotlin -classpath BarcodeUtilTest.jar org.junit.runner.JUnitCore util.BarcodeUtilTest
fi