Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNE-6228: Replace Travis CI with Github Actions #320

Merged
merged 5 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy

on:
push:
branches: [main]
tags: ['*']

env:
JAVA_VERSION: 11

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'adopt'
- name: Release to Maven Central
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ci-release
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies for PyPI release
run: |
sudo apt-get install -y pandoc
cd python
make
pip install --only-binary=numpy,scipy -r requirements.txt
- name: Build and publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
cd python
python setup.py sdist bdist_wheel
pip install twine
twine upload dist/*
if: startsWith(github.ref, 'refs/tags/')
65 changes: 65 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
SCALA_VERSION: 2.13.8
JAVA_VERSION: 11

jobs:
test-scala:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'adopt'
- name: Cache SBT dependencies
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
~/.m2
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Run Scala tests
run: |
sbt -Dsbt.log.noformat=true scalafmtCheckAll
sbt -Dsbt.log.noformat=true +test

test-python:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
os: [ubuntu-latest]
Comment on lines +42 to +43
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An earlier commit had python 3.8-3.12 and also had mac and windows OS. Unfortunately, it looks like lolo is not up to date so I reverted back to ubuntu and 3.8. I plan to make another PR to bring lolo into the present

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
cd python
make
pip install --only-binary=numpy,scipy -r requirements.txt
pip install -r test_requirements.txt
- name: Run Python tests
run: |
cd python
nosetests
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

Loading