From 3ccc116b85fa5f0f4354f0957dd642702a13a12e Mon Sep 17 00:00:00 2001 From: Vincent Blondeau Date: Fri, 22 Dec 2023 16:02:25 +0100 Subject: [PATCH] Add CI support (#12) * Add CI workflow defintion * Add unit test conf file * update readme with build info --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ .smalltalkci/.unit-tests.ston | 16 ++++++++++++++++ README.md | 5 +++++ 3 files changed, 48 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .smalltalkci/.unit-tests.ston diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..52ecd7c4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: Build + +on: [push,pull_request,workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + smalltalk: [ Pharo64-7.0, Pharo64-8.0, Pharo64-9.0, Pharo64-10, Pharo64-11 ] + name: ${{ matrix.smalltalk }} + steps: + - uses: actions/checkout@v2 + - name: Set up Smalltalk CI + uses: hpi-swa/setup-smalltalkCI@v1 + with: + smalltalk-image: ${{ matrix.smalltalk }} + - name: Load Image and Run Tests + run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/.unit-tests.ston + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + timeout-minutes: 15 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + name: ${{matrix.os}}-${{matrix.smalltalk}} + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.smalltalkci/.unit-tests.ston b/.smalltalkci/.unit-tests.ston new file mode 100644 index 00000000..9d17e777 --- /dev/null +++ b/.smalltalkci/.unit-tests.ston @@ -0,0 +1,16 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'XPath', + #directory : '../src', + #load : [ 'Tests' ], + #platforms : [ #pharo ] + } + ], + #testing : { + #coverage : { + #packages : [ 'XPath*' ], + #format: #lcov + } + } +} \ No newline at end of file diff --git a/README.md b/README.md index 00fca23e..7e2e16a4 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ [![Build Status](https://travis-ci.org/pharo-contributions/XML-XPath.svg?branch=master)](https://travis-ci.org/pharo-contributions/XML-XPath) [![Coverage Status](https://coveralls.io/repos/github/pharo-contributions/XML-XPath/badge.svg?branch=master)](https://coveralls.io/github/pharo-contributions/XML-XPath?branch=master) + +[![Unit Tests](https://github.com/pharo-contributions/XML-XPath/workflows/Build/badge.svg?branch=master)](https://github.com/pharo-contributions/XML-XPath/actions?query=workflow%3ABuild) +[![Coverage Status](https://codecov.io/github/pharo-contributions/XML-XPath/coverage.svg?branch=master)](https://codecov.io/gh/pharo-contributions/XML-XPath/branch/master) + + An XPath library for [Pharo](http://www.pharo.org) leveraging the XML parsing capabilities of [XMLParser](https://github.com/pharo-contributions/XML-XMLParser). Supports XPath 1.0 syntax with extensions. ## Installation