Rijndael256
Rijndael256 copied to clipboard
Replace Travis-CI with GitHub "CI" Action
With the advancement of GitHub Actions there is no longer a need/value in using an external service for Continuous Integration. Replace the existing Travis-CI setup with a new GitHub Action
The following back-of-napkin script is untested, but it should look something like:
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
# Step 2: Set up .NET Core SDK
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '1.0.x'
# Step 3: Install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gettext libcurl4-openssl-dev libicu-dev libssl-dev libunwind8 zlib1g
# Step 4: Install the specific .NET Core SDK version
- name: Install .NET Core CLI
run: |
export DOTNET_INSTALL_DIR="$PWD/.dotnetcli"
curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version latest --install-dir "$DOTNET_INSTALL_DIR"
echo "$DOTNET_INSTALL_DIR" >> $GITHUB_PATH
# Step 5: Restore the dependencies
- name: Restore dependencies
run: dotnet restore
# Step 6: Run tests
- name: Run tests
run: dotnet test ./Rijndael256.Tests/Rijndael256.Tests.csproj -c Release -f netcoreapp1.0