Skip to content

Commit

Permalink
Merge pull request #224 from alphaville/move_to_gha
Browse files Browse the repository at this point in the history
Moved to Github Actions
  • Loading branch information
korken89 authored Feb 5, 2021
2 parents 54106ec + f8d1797 commit 37b0270
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 113 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches: [ master ]
pull_request:

name: Continuous integration

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-18.04, ubuntu-latest, macos-latest]
env:
DO_DOCKER: 0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
- run: bash ./ci/script.sh
21 changes: 21 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches: [ master ]
pull_request:

name: Clippy check
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --examples
23 changes: 23 additions & 0 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
branches: [ master ]
pull_request:

name: Code formatting check

jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
98 changes: 0 additions & 98 deletions .travis.yml

This file was deleted.

22 changes: 7 additions & 15 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,23 @@
set -euxo pipefail

regular_test() {
# Run Rust tests
# ------------------------------------
cargo test

# Run Clippy
# ------------------------------------
cargo clippy --all-targets --all-features

# Run Python tests
# ------------------------------------

# Create virtual environment
cd open-codegen
export PYTHONPATH=.
virtualenv -p python$PYTHON_VERSION venv
# --- activate venv
source venv/bin/activate
# virtualenv -p python3 venv

# # --- activate venv
# source venv/bin/activate

# --- install opengen
python setup.py install

# --- uncomment to run main file
# run opengen main.py

# --- run the tests
cd opengen
export PYTHONPATH=.
Expand Down

0 comments on commit 37b0270

Please sign in to comment.