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

Commit9db68a2

Browse files
committed
added github actions workflow to replace travis
1 parent41ae994 commit9db68a2

File tree

3 files changed

+64
-28
lines changed

3 files changed

+64
-28
lines changed

‎.github/workflows/main.yml

Lines changed: 62 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,71 @@
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-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
42+
sudo sh -c 'echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial/snapshots/6.12 main" > /etc/apt/sources.list.d/mono-official-6.12.list'
43+
sudo apt update
44+
sudo apt install mono-devel ca-certificates-mono -y
2745
28-
# Runs a single command using the runners shell
29-
-name:Run a one-line script
30-
run:echo Hello, world!
46+
-name:Install .NET
47+
if:${{ matrix.toolset == '.NET' }}
48+
uses:actions/setup-dotnet@v1
49+
with:
50+
dotnet-version:3.1.x
3151

32-
# Runs a set of commands using the runners shell
33-
-name:Run a multi-line script
52+
-name:Set up Python ${{ matrix.python }}
53+
uses:actions/setup-python@v2
54+
with:
55+
python-version:${{ matrix.python }}
56+
57+
-name:Install dependencies
58+
run:|
59+
pip install --upgrade setuptools # TEMP - due to setuptools 36.2.0 bug
60+
pip install --upgrade -r requirements.txt
61+
62+
-name:Install
3463
run:|
35-
echo Add other actions to build,
36-
echo test, and deploy your project.
64+
echo $BUILD_OPTS
65+
python setup.py install $BUILD_OPTS
66+
67+
-name:Python Tests
68+
run:pytest
69+
70+
-name:.NET Tests
71+
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}"

‎src/tests/test_method.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def test_we_can_bind_to_encoding_get_string():
761761
read=1
762762

763763
whileread>0:
764-
read,_=stream.Read(buff,0,buff.Length)
764+
read=stream.Read(buff,0,buff.Length)
765765
temp=Encoding.UTF8.GetString(buff,0,read)
766766
data.append(temp)
767767

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp