Skip to content

Added github actions workflow to replace travis #1307

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

Merged
merged 2 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
added github actions workflow to replace travis
  • Loading branch information
lostmsu committed Dec 8, 2020
commit d47d3882bd34826b97148a5f9916982614fe42cc
87 changes: 60 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,69 @@
# This is a basic workflow to help you get started with Actions

name: GitHub Actions

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
on: [ pull_request, push ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
build-test:
name: Build and Test
runs-on: ubuntu-16.04

strategy:
matrix:
python: [3.6,3.7,3.8,3.9]
shutdown_mode: [Normal,Soft]
toolset: [Mono,.NET]
include:
- toolset: .NET
BUILD_OPTS: --xplat
RUN_TESTS: dotnet
EMBED_TESTS_PATH: netcoreapp3.1_publish/
PERF_TESTS_PATH: net461/
- toolset: Mono
BUILD_OPTS: ""
RUN_TESTS: "mono ./packages/NUnit.*/tools/nunit3-console.exe"
EMBED_TESTS_PATH: ""
PERF_TESTS_PATH: ""

env:
BUILD_OPTS: ${{ matrix.BUILD_OPTS }}
RUN_TESTS: ${{ matrix.RUN_TESTS }}
EMBED_TESTS_PATH: ${{ matrix.EMBED_TESTS_PATH }}
PERF_TESTS_PATH: ${{ matrix.PERF_TESTS_PATH }}
PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Install Mono
if: ${{ matrix.toolset == 'Mono' }}
run: |
sudo apt update
sudo apt install mono-devel ca-certificates-mono -y

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
- name: Install .NET
if: ${{ matrix.toolset == '.NET' }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install dependencies
run: |
pip install --upgrade setuptools # TEMP - due to setuptools 36.2.0 bug
pip install --upgrade -r requirements.txt

- name: Install
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo $BUILD_OPTS
python setup.py install $BUILD_OPTS

- name: Python Tests
run: pytest

- name: .NET Tests
run: $RUN_TESTS src/embed_tests/bin/$EMBED_TESTS_PATH/Python.EmbeddingTest.dll --labels=All
1 change: 1 addition & 0 deletions pythonnet.15.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF-
appveyor.yml = appveyor.yml
ci\appveyor_build_recipe.ps1 = ci\appveyor_build_recipe.ps1
ci\appveyor_run_tests.ps1 = ci\appveyor_run_tests.ps1
.github\workflows\main.yml = .github\workflows\main.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{57F5D701-F265-4736-A5A2-07249E7A4DA3}"
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy