Skip to content

Add GitHub Actions CI workflow to replace AppVeyor#43

Merged
chsword merged 4 commits intomainfrom
copilot/add-github-ci-solution
Oct 11, 2025
Merged

Add GitHub Actions CI workflow to replace AppVeyor#43
chsword merged 4 commits intomainfrom
copilot/add-github-ci-solution

Conversation

Copy link
Contributor

Copilot AI commented Oct 11, 2025

Overview

This PR replaces the existing AppVeyor CI configuration with a modern GitHub Actions workflow, providing comprehensive multi-platform testing and automated package building.

What Changed

1. New GitHub Actions Workflow

Created .github/workflows/dotnet-ci.yml with the following features:

  • Multi-platform testing: Runs builds and tests on Ubuntu, Windows, and macOS
  • Multi-.NET version support: Tests with .NET 6.0, 8.0, and 9.0 SDKs
  • Comprehensive framework coverage: Builds all target frameworks (netstandard2.0, netstandard2.1, net472, net6.0, net8.0, net9.0)
  • Automated NuGet packaging: Creates packages on main branch pushes
  • Test artifact uploads: Preserves test results for all platforms
  • Performance optimizations: Implements NuGet package caching

The workflow consists of two jobs:

  1. build-and-test: Validates the build across all three operating systems using a matrix strategy
  2. package: Creates NuGet packages (runs only on main branch pushes after successful tests)

2. Removed AppVeyor Configuration

  • Deleted appveyor.yml
  • Removed reference from solution file

3. Updated Documentation

  • Updated build status badges in README.md and README_EN.md to point to the new GitHub Actions workflow

4. Fixed Build Issue

Fixed a syntax error in Chsword.Excel2Object/Internal/ExcelConstants.cs where the CommonDateTimeFormats array was missing its opening bracket for the collection expression.

Why This Change?

The new GitHub Actions CI provides several advantages over AppVeyor:

  1. Better platform coverage: Tests on Linux, Windows, and macOS instead of just Windows
  2. Native integration: Built into GitHub with better visibility and no external dependencies
  3. Free for open source: No concerns about CI minutes or service availability
  4. Modern tooling: Latest action versions and better caching mechanisms
  5. Faster feedback: Parallel execution across platforms

Testing

✅ All 88 tests pass on the local environment
✅ Builds successfully for all 6 target frameworks
✅ Workflow YAML syntax validated with yamllint
✅ Clean build from scratch verified

The workflow will be automatically triggered on the next push/PR to validate multi-platform compatibility.

Related Issues

Fixes issue: 添加 github ci 方案 取代现有ci 并保证项目编译测试通过 (Add GitHub CI solution to replace existing CI and ensure project builds and tests pass)

Original prompt

添加 github ci 方案 取代现有ci 并保证项目编译测试通过


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits October 11, 2025 09:10
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub CI solution to replace existing CI Add GitHub Actions CI workflow to replace AppVeyor Oct 11, 2025
Copilot AI requested a review from chsword October 11, 2025 09:15
@chsword chsword marked this pull request as ready for review October 11, 2025 09:24
Copilot AI review requested due to automatic review settings October 11, 2025 09:24
@chsword chsword merged commit d9d1cb1 into main Oct 11, 2025
9 of 10 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the CI/CD pipeline by replacing the existing AppVeyor configuration with a comprehensive GitHub Actions workflow that provides multi-platform testing and automated NuGet package building.

  • Replaces AppVeyor CI with GitHub Actions for better platform coverage and native GitHub integration
  • Implements multi-platform testing across Ubuntu, Windows, and macOS with .NET 6.0, 8.0, and 9.0 support
  • Fixes a syntax error in the ExcelConstants.cs file for modern C# collection expressions

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
appveyor.yml Removes legacy AppVeyor CI configuration
.github/workflows/dotnet-core.yml Removes outdated .NET Core workflow
.github/workflows/dotnet-ci.yml Adds comprehensive CI workflow with multi-platform testing and NuGet packaging
README.md, README_EN.md Updates build status badges to point to new GitHub Actions workflow
Chsword.Excel2Object.sln Removes AppVeyor configuration reference from solution
Chsword.Excel2Object/Internal/ExcelConstants.cs Fixes collection expression syntax for C# 12 compatibility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

name: Create NuGet Package
runs-on: ubuntu-latest
needs: build-and-test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition only checks for 'main' branch but the workflow triggers on both 'main' and 'master' branches (line 5). Consider updating to check for both branches: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')

Suggested change
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments