-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub actions integration tests (#5)
* Add dependabot and release yml * Create dotnet-integration-tests.yml * Update dotnet-integration-tests.yml * Update dotnet-integration-tests.yml * Update dotnet-integration-tests.yml * Update dotnet-integration-tests.yml * Create separate dockerfile for integration tests
- Loading branch information
Showing
4 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
# Enable version updates for NuGet | ||
- package-ecosystem: "nuget" | ||
directory: "/" | ||
target-branch: "main" | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- "dependencies" | ||
# Check for updates once a week | ||
schedule: | ||
day: "monday" | ||
time: "09:00" | ||
interval: "weekly" | ||
# Ignore certain dependencies (optional) | ||
# ignore: | ||
# - dependency-name: "SomePackage" | ||
# versions: ["4.x", "5.x"] | ||
|
||
# Enable version updates for npm | ||
- package-ecosystem: "npm" | ||
# Look for `package.json` and `lock` files in the `root` directory | ||
directory: "/" | ||
# Check for updates once a week | ||
schedule: | ||
day: "monday" | ||
time: "09:00" | ||
interval: "weekly" | ||
|
||
# Enable version updates for Docker | ||
- package-ecosystem: "docker" | ||
# Look for a `Dockerfile` in the `root` directory | ||
directory: "/" | ||
# Check for updates once a week | ||
schedule: | ||
day: "monday" | ||
time: "09:00" | ||
interval: "weekly" | ||
|
||
# Enable version updates for Composer | ||
- package-ecosystem: "composer" | ||
# Look for a `Dockerfile` in the `root` directory | ||
directory: "/" | ||
# Check for updates once a week | ||
schedule: | ||
day: "monday" | ||
time: "09:00" | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# .github/release.yml | ||
|
||
changelog: | ||
categories: | ||
- title: 🚀 New Features | ||
labels: | ||
- '*' | ||
exclude: | ||
labels: | ||
- dependencies | ||
- bug | ||
- title: 🐞 Bug Fixes | ||
labels: | ||
- bug | ||
- title: 🧩 Dependencies Updates | ||
labels: | ||
- dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This workflow will test if running the integration tests works. | ||
name: .NET Integration Tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build integration tests image | ||
run: docker build -t mov2gif-integration-tests -f src/Tests/Mov2Gif.IntegrationTests/Dockerfile . | ||
|
||
- name: Run integration tests | ||
run: docker run --rm mov2gif-integration-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build | ||
WORKDIR /src | ||
|
||
# Copy project files first for better layer caching | ||
COPY ["src/Tests/Mov2Gif.IntegrationTests/Mov2Gif.IntegrationTests.csproj", "Tests/Mov2Gif.IntegrationTests/"] | ||
COPY ["src/Utilities/Mov2Gif.Utilities.GifConverter/Mov2Gif.Utilities.GifConverter.csproj", "Utilities/Mov2Gif.Utilities.GifConverter/"] | ||
RUN dotnet restore "Tests/Mov2Gif.IntegrationTests/Mov2Gif.IntegrationTests.csproj" | ||
|
||
# Copy the rest of the source code | ||
COPY ["src/Tests/Mov2Gif.IntegrationTests/", "Tests/Mov2Gif.IntegrationTests/"] | ||
COPY ["src/Utilities/Mov2Gif.Utilities.GifConverter/", "Utilities/Mov2Gif.Utilities.GifConverter/"] | ||
|
||
# Install FFmpeg | ||
RUN apt-get update && \ | ||
apt-get install -y ffmpeg && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the entry point to run tests | ||
ENTRYPOINT ["dotnet", "test", "Tests/Mov2Gif.IntegrationTests/Mov2Gif.IntegrationTests.csproj", "--verbosity", "normal"] |