diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..792117f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: Build +on: [push, pull_request] +jobs: + build-Ubuntu_and_MacOs: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.x' + - name: Build + run: for f in $(find . -name "* sln"); do dotnet build $f; done + - name: Run tests + run: for f in $(find . -name "*.sln"); do dotnet test $f; done + build-Windows: + runs-on: windows-latest + defaults: + run: + shell: cmd + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.x' + - name: Build + run: For /R %%I in (*.sln) do dotnet build %%I + - name: Run tests + run: For /R %%I in (*.sln) do dotnet test %%I + diff --git a/README.md b/README.md index dc930ff..a5ca088 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ +[![GitHub Actions CI](https://github.com/kamendov-maxim/semester2/actions/workflows/ci.yml/badge.svg)](https://github.com/kamendov-maxim/semester2/actions/workflows/ci.yml) + Репозиторий с домашними заданиями для университета