Excel2Object icon indicating copy to clipboard operation
Excel2Object copied to clipboard

Add GitHub Actions CI to replace AppVeyor and fix build errors

Open Copilot opened this issue 4 months ago • 0 comments

Overview

This PR adds a modern GitHub Actions CI workflow to replace the existing AppVeyor CI configuration, while also fixing critical build errors that prevented the project from compiling.

Changes

1. Fixed Build Error in ExcelConstants.cs

The project had a syntax error in the CommonDateTimeFormats array initialization that prevented compilation:

// Before (incorrect)
public static readonly string[] CommonDateTimeFormats = 
    "yyyy-MM-ddTHH:mm:ss",
    "yyyy-MM-ddTHH:mm:ssZ",
    ...

// After (correct)
public static readonly string[] CommonDateTimeFormats = 
[
    "yyyy-MM-ddTHH:mm:ss",
    "yyyy-MM-ddTHH:mm:ssZ",
    ...
];

2. Updated GitHub Actions Workflow

Replaced the outdated .github/workflows/dotnet-core.yml (which used .NET Core 3.1) with a comprehensive modern CI pipeline:

Key improvements:

  • Multi-framework support: Builds and tests with .NET 6.0, 8.0, and 9.0
  • Cross-platform testing: Matrix strategy runs tests on both Ubuntu and Windows
  • Test result artifacts: Automatically uploads test results for review
  • NuGet package generation: Creates and uploads NuGet packages as artifacts
  • Updated actions: Uses latest versions (checkout@v4, setup-dotnet@v4, upload-artifact@v4)
  • Branch flexibility: Triggers on both main and master branches

3. Updated Documentation

  • Updated CI badge in README.md (Chinese) to reference GitHub Actions instead of AppVeyor
  • Updated CI badge in README_EN.md (English) to reference GitHub Actions instead of AppVeyor

4. Removed AppVeyor Configuration

  • Deleted appveyor.yml as it's replaced by GitHub Actions
  • Updated solution file to reference the new GitHub Actions workflow

Test Results

All 88 tests pass successfully
Builds successfully for all target frameworks: netstandard2.0, net472, net6.0, netstandard2.1, net8.0, net9.0
NuGet package generation verified

Migration Notes

The new GitHub Actions workflow provides better integration with the GitHub ecosystem and more comprehensive CI coverage than the previous AppVeyor setup. No action is required from contributors - the new CI will automatically run on all pull requests and pushes.

Original prompt

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


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Oct 11 '25 09:10 Copilot