Skip to content

Commit

Permalink
Add compatibility testing (#132)
Browse files Browse the repository at this point in the history
* Test with last 5 minor versions

* Remove clojurescript runner

* Add compatibility note
  • Loading branch information
nnichols authored Sep 30, 2024
1 parent 5b10014 commit 8fa5499
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Backwards Compatibility Tests

on: ["workflow_dispatch", "pull_request"]

jobs:
compatibility_test:
strategy:
matrix:
clojure_version: ['1.8.0', '1.9.0', '1.10.0', '1.11.0', '1.12.0']

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.clojure_version }}
cancel-in-progress: true

runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Print concurrency group
run: echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'

- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: cache-maven
with:
path: ~/.m2
save-always: true
key: ${{ runner.os }}-clj-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-clj
- name: Install Clojure Dependencies
run: lein deps

- name: Override Clojure Version
run: lein change :dependencies:org.clojure/clojure set '"${{ matrix.clojure_version }}"'

- name: Run all tests
run: lein test

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ To use it, add the following as a dependency in your project.clj file:
The next time you build your application, [Leiningen](https://leiningen.org/) or [deps.edn](https://clojure.org/guides/deps_and_cli) should pull it automatically.
Alternatively, you may clone or fork the repository to work with it directly.

### Clojure Version Compatibility

clj-xml runs its test suite in a matrix, replacing the clojure version with multiple previous versions of the language.
If your project is not running the most recent version of clojure, please consult the most recent compatibility testing results in the [CI/CD pipeline](https://github.com/Wall-Brew-Co/clj-xml/actions/workflows/compatibility.yml).

## Public Functions

### XML Parsing
Expand Down

0 comments on commit 8fa5499

Please sign in to comment.