Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Travis-CI with GitHub "CI" Action #21

Open
JasonPierce opened this issue Sep 9, 2024 · 0 comments
Open

Replace Travis-CI with GitHub "CI" Action #21

JasonPierce opened this issue Sep 9, 2024 · 0 comments
Assignees

Comments

@JasonPierce
Copy link
Contributor

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
@JasonPierce JasonPierce self-assigned this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant