Skip to content

Commit

Permalink
Replace .travis.yml with ci-build.yml #23
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-austin committed Feb 1, 2022
1 parent 74c714d commit 2d424e3
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 32 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI Build
on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
include:
- version: 8
experimental: false
- version: 11
experimental: true

steps:
- name: Checkout ICAT Client
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.version }}
distribution: 'temurin'

- name: Installation
run: |
sudo pip install wheel ansible pycrypto
sudo add-apt-repository universe
sudo apt-get update
- name: Setup python2
run: |
sudo apt install python2
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
sudo python2 -m pip install requests requests_toolbelt
- name: Checkout ICAT Ansible
uses: actions/checkout@v2
with:
repository: icatproject-contrib/icat-ansible
path: icat-ansible

- name: Setup Ansible
run: |
cd icat-ansible
echo -e "[icat-client-dev-hosts]\nlocalhost ansible_connection=local" > hosts
echo -e "icattravispw" > vault_pass.txt
mv ../vault.yml ./group_vars/all
mv ../icat-client-dev-hosts.yml .
sed -i -e "s/^payara_user: \"glassfish\"/payara_user: \"runner\"/" ./group_vars/all/vars.yml
sed -i -e "s/python-pip/python3-pip/" ./roles/dev-common/tasks/main.yml
ansible-playbook --vault-password-file ./vault_pass.txt --inventory ./hosts ./icat-client-dev-hosts.yml
cd ..
- name: Test with Maven
run: mvn -DserverUrl=https://$(hostname -f):8181 test -B
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# icat.client: Clients for ICAT

[![Build Status](https://travis-ci.org/icatproject/icat.client.svg?branch=master)](https://travis-ci.org/icatproject/icat.client)
[![Build Status](https://github.com/icatproject/icat.client/workflows/CI%20Build/badge.svg?branch=master)](https://github.com/icatproject/icat.client/actions?query=workflow%3A%22CI+Build%22)

General installation instructions are at https://icatproject.org/installation/component

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/icatproject/icat/TestIcatClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testInfo() throws Exception {
@Test
public void python() {
ShellCommand sc = new ShellCommand("bash", "-c", "serverUrl=" + System.getProperty("serverUrl")
+ " PYTHONPATH=src/main/python/ python src/test/python/test.py");
+ " PYTHONPATH=src/main/python/ python2 src/test/python/test.py");
if (sc.getExitValue() != 0) {
System.out.println(sc.getStdout());
System.out.println(sc.getStderr());
Expand Down

0 comments on commit 2d424e3

Please sign in to comment.