Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Commit

Permalink
Re-add CircleCI
Browse files Browse the repository at this point in the history
GH Actions is so bad, damn
  • Loading branch information
Tristan971 committed Jul 26, 2020
1 parent eb270f2 commit 13a0e01
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 18 deletions.
50 changes: 50 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 2
jobs:
build:
docker:
- image: tristandeloche/easyfxml-docker:1.0.0
working_directory: ~/build
steps:
- checkout

- restore_cache:
key: m2-{{ .Branch }}-{{ checksum "pom.xml" }}
paths:
- ~/.m2/repository

- run:
name: Prepare code coverage reporting
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > cc-test-reporter && \
chmod +x cc-test-reporter && \
./cc-test-reporter before-build
- run:
name: Build and test
command: '/bin/easyfxml-maven clean install'

- save_cache:
key: m2-{{ .Branch }}-{{ checksum "pom.xml" }}
paths:
- ~/.m2/repository

- run:
name: Aggregate test results
command: './.circleci/copy_recursive_regex.sh ".*/target/surefire-reports/.*xml" test-results'
when: always
- run:
name: Aggregate artifacts
command: './.circleci/copy_recursive_regex.sh ".*/target/.*jar" artifacts'
when: always

- run:
name: Publish code coverage reporting
command: |
JACOCO_SOURCE_PATH=easyfxml/src/main/java ./cc-test-reporter format-coverage easyfxml/target/site/jacoco/jacoco.xml --input-type jacoco && \
./cc-test-reporter upload-coverage -r 9791cde00c987e47a9082b96f73a2b4eb3590f308c501a3c61d34e0276c93ec1
- store_test_results:
path: test-results
- store_artifacts:
path: artifacts

11 changes: 11 additions & 0 deletions .circleci/copy_recursive_regex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

REGEX="$1"
DEST_FOLDER=$2

rm -rf ${DEST_FOLDER}
mkdir -p ${DEST_FOLDER}

find . -type f -regex ${REGEX} \
-exec echo {} \; \
-exec cp {} ${DEST_FOLDER} \;
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml

This file was deleted.

0 comments on commit 13a0e01

Please sign in to comment.