Skip to content

Commit

Permalink
Changes to GitHub Actions
Browse files Browse the repository at this point in the history
 - update OS to Ubuntu 22.04
 - use OS python version
 - add Java 17 to version matrix
 - run apt-get update
 - remove installation of python3-lxml which is now done by icat-ansible
  • Loading branch information
ajkyffin committed Aug 8, 2023
1 parent ddb620f commit 5430c3a
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,18 @@ on:

jobs:
build_and_tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- version: 11
java_version: [11, 17]

steps:
# Setup Java & Python
- name: Setup Java
uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 # v3.10.0
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}
- name: Setup Python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
with:
python-version: "3.9.7"
architecture: x64
java-version: ${{ matrix.java_version }}

- name: Cache local Maven repository
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
Expand All @@ -36,6 +29,9 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Run apt-get update
run: sudo apt-get update

# ICAT Ansible clone and install dependencies
- name: Checkout icat-ansible
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
Expand Down Expand Up @@ -72,10 +68,6 @@ jobs:
sudo apt-get remove --purge "mysql*"
sudo rm -rf /var/lib/mysql* /etc/mysql
# Needed for `maven_artifact` module on Ansible - lxml is in requirements.txt but doesn't seem to work on GitHub Actions
- name: Install lxml
run: sudo apt-get install python3-lxml

# Create local instance of ICAT
- name: Run ICAT Ansible Playbook
run: |
Expand Down

0 comments on commit 5430c3a

Please sign in to comment.