Skip to content

Commit

Permalink
Add 'Github Actions' configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed Jul 9, 2023
1 parent df9c5da commit 6b3609b
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches:
- 'master'
tags: [ 'v*' ]
pull_request:
branches:
- 'master'

defaults:
run:
shell: bash

jobs:
test:
name: 'Test'
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
dotnet_version: [ '3.8', '3.9', '3.10', '3.11' ]
python_version: [ '6.x', '7.x' ]
platform: [
{
os: 'macos-latest',
python_architecture: 'x64'
},
{
os: 'ubuntu-latest',
python_architecture: 'x64'
},
{
os: 'windows-latest',
python_architecture: 'x64'
},
{
os: 'windows-latest',
python_architecture: 'x86'
},
]
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Setup .NET'
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet_version }}
- name: 'Install C# linter'
run: dotnet tool install csharpier
- name: 'Run C# linter'
run: dotnet csharpier --check .
- name: 'Setup Python'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.platform.python_architecture }}
- name: 'Install tests dependencies'
run: python -m pip install -r requirements-tests.txt
- name: 'Build project'
run: dotnet publish --property:PublishDir=$PWD/tests/ .
- name: 'Run tests'
run: pytest

0 comments on commit 6b3609b

Please sign in to comment.