Skip to content

Commit 7c15626

Browse files
MatteoPologrutoper1234
authored andcommitted
Add CI workflow to run integration tests
On every push and pull request that affects relevant files, run the integration tests.
1 parent c130260 commit 7c15626

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Integration Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule: # Scheduled trigger checks for breakage caused by changes to create-changelog
7+
# run every Tuesday at 3 AM UTC
8+
- cron: "0 3 * * 2"
9+
# workflow_dispatch event allows the workflow to be triggered manually
10+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
11+
workflow_dispatch:
12+
# repository_dispatch event allows the workflow to be triggered via the GitHub API
13+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
14+
repository_dispatch:
15+
16+
jobs:
17+
defaults:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout local repository
22+
uses: actions/checkout@v3
23+
24+
# Run the action using default values as much as possible.
25+
- name: Run action
26+
uses: ./ # Use the action from the local path.
27+
28+
expected-pass:
29+
runs-on: ubuntu-latest
30+
31+
env:
32+
CHANGELOG_FILE_PATH: /tmp/CHANGELOG.md
33+
steps:
34+
- name: Checkout local repository
35+
uses: actions/checkout@v3
36+
37+
- name: Run action
38+
uses: ./
39+
with:
40+
tag-regex: '^[0-9]+\.[0-9]+\.[0-9]+.*$'
41+
case-insensitive-regex: true
42+
changelog-file-path: "${{ env.CHANGELOG_FILE_PATH }}"
43+
44+
- name: Verify report file exists
45+
run: |
46+
[ -e "${{ env.CHANGELOG_FILE_PATH }}" ]

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Actions Status](https://github.com/arduino/create-changelog/workflows/Test%20Action/badge.svg)](https://github.com/arduino/create-changelog/actions)
44
[![Check Packaging status](https://github.com/arduino/create-changelog/actions/workflows/check-packaging-ncc-typescript-npm.yml/badge.svg)](https://github.com/arduino/create-changelog/actions/workflows/check-packaging-ncc-typescript-npm.yml)
5+
[![Integration Tests status](https://github.com/arduino/create-changelog/actions/workflows/test-integration.yml/badge.svg)](https://github.com/arduino/create-changelog/actions/workflows/test-integration.yml)
56

67
This actions is an highly opinionated tool that creates changelogs from the git repository commit history.
78

0 commit comments

Comments
 (0)