Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd47d388

Browse files
committed
added github actions workflow to replace travis
1 parentcf606cd commitd47d388

File tree

2 files changed

+61
-27
lines changed

2 files changed

+61
-27
lines changed

‎.github/workflows/main.yml

Lines changed: 60 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,69 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name:GitHub Actions
42

5-
# Controls when the action will run.
6-
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
8-
push:
9-
branches:[ master ]
10-
pull_request:
11-
branches:[ master ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
14-
workflow_dispatch:
3+
on:[ pull_request, push ]
154

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
175
jobs:
18-
# This workflow contains a single job called "build"
19-
build:
20-
# The type of runner that the job will run on
21-
runs-on:ubuntu-latest
6+
build-test:
7+
name:Build and Test
8+
runs-on:ubuntu-16.04
9+
10+
strategy:
11+
matrix:
12+
python:[3.6,3.7,3.8,3.9]
13+
shutdown_mode:[Normal,Soft]
14+
toolset:[Mono,.NET]
15+
include:
16+
-toolset:.NET
17+
BUILD_OPTS:--xplat
18+
RUN_TESTS:dotnet
19+
EMBED_TESTS_PATH:netcoreapp3.1_publish/
20+
PERF_TESTS_PATH:net461/
21+
-toolset:Mono
22+
BUILD_OPTS:""
23+
RUN_TESTS:"mono ./packages/NUnit.*/tools/nunit3-console.exe"
24+
EMBED_TESTS_PATH:""
25+
PERF_TESTS_PATH:""
26+
27+
env:
28+
BUILD_OPTS:${{ matrix.BUILD_OPTS }}
29+
RUN_TESTS:${{ matrix.RUN_TESTS }}
30+
EMBED_TESTS_PATH:${{ matrix.EMBED_TESTS_PATH }}
31+
PERF_TESTS_PATH:${{ matrix.PERF_TESTS_PATH }}
32+
PYTHONNET_SHUTDOWN_MODE:${{ matrix.SHUTDOWN_MODE }}
2233

23-
# Steps represent a sequence of tasks that will be executed as part of the job
2434
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26-
-uses:actions/checkout@v2
35+
-name:Checkout code
36+
uses:actions/checkout@v2
37+
38+
-name:Install Mono
39+
if:${{ matrix.toolset == 'Mono' }}
40+
run:|
41+
sudo apt update
42+
sudo apt install mono-devel ca-certificates-mono -y
2743
28-
# Runs a single command using the runners shell
29-
-name:Run a one-line script
30-
run:echo Hello, world!
44+
-name:Install .NET
45+
if:${{ matrix.toolset == '.NET' }}
46+
uses:actions/setup-dotnet@v1
47+
with:
48+
dotnet-version:3.1.x
3149

32-
# Runs a set of commands using the runners shell
33-
-name:Run a multi-line script
50+
-name:Set up Python ${{ matrix.python }}
51+
uses:actions/setup-python@v2
52+
with:
53+
python-version:${{ matrix.python }}
54+
55+
-name:Install dependencies
56+
run:|
57+
pip install --upgrade setuptools # TEMP - due to setuptools 36.2.0 bug
58+
pip install --upgrade -r requirements.txt
59+
60+
-name:Install
3461
run:|
35-
echo Add other actions to build,
36-
echo test, and deploy your project.
62+
echo $BUILD_OPTS
63+
python setup.py install $BUILD_OPTS
64+
65+
-name:Python Tests
66+
run:pytest
67+
68+
-name:.NET Tests
69+
run:$RUN_TESTS src/embed_tests/bin/$EMBED_TESTS_PATH/Python.EmbeddingTest.dll --labels=All

‎pythonnet.15.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF-
2727
appveyor.yml=appveyor.yml
2828
ci\appveyor_build_recipe.ps1=ci\appveyor_build_recipe.ps1
2929
ci\appveyor_run_tests.ps1=ci\appveyor_run_tests.ps1
30+
.github\workflows\main.yml= .github\workflows\main.yml
3031
EndProjectSection
3132
EndProject
3233
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") ="Solution Items","Solution Items","{57F5D701-F265-4736-A5A2-07249E7A4DA3}"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp