Skip to content

Merge pull request #57 from intersystems/fix-mapping-sql-performance #8

Merge pull request #57 from intersystems/fix-mapping-sql-performance

Merge pull request #57 from intersystems/fix-mapping-sql-performance #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # force semantic versioning
jobs:
build-and-release:
runs-on: ubuntu-latest
env:
container_image: intersystemsdc/iris-community:latest
instance: iris
test_reports: test-reports
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Container
run: |
# Create test_reports directory to share test results before running container
mkdir $test_reports
chmod 777 $test_reports
# Run InterSystems IRIS instance
docker pull $container_image
docker run -d -h $instance --name $instance -v $GITHUB_WORKSPACE:/source -v $GITHUB_WORKSPACE/$test_reports:/$test_reports --init $container_image
echo halt > wait
# Wait for instance to be ready
until docker exec --interactive $instance iris session $instance < wait; do sleep 1; done
- name: Install TestCoverage
run: |
echo "zpm \"install testcoverage\":1:1" > install-testcoverage
docker exec --interactive $instance iris session $instance -B < install-testcoverage
# Workaround for permissions issues in TestCoverage (creating directory for source export)
chmod 777 $GITHUB_WORKSPACE
- name: Export XML
run: |
# Pick the targets to export as XML
echo 'set list("TestCoverage.*.cls") = ""' >> export
echo 'set list("TestCoverage.inc") = ""' >> export
echo 'do $System.OBJ.Export(.list,"/source/TestCoverage-${{ github.ref_name }}.xml","/exportversion=2017.2")' >> export
docker exec --interactive $instance iris session $instance -B < export
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: TestCoverage-${{ github.ref_name }}.xml
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: |
Automated release created by [action-gh-release](https://github.com/softprops/action-gh-release).
draft: false
prerelease: false