Skip to content

Commit

Permalink
Merge pull request #13 from per1234/integration-tests
Browse files Browse the repository at this point in the history
Set up basic integration tests
  • Loading branch information
per1234 authored Apr 13, 2021
2 parents a4d9499 + cdd3f82 commit ef5174b
Show file tree
Hide file tree
Showing 5 changed files with 790 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Run integration tests

on:
pull_request:
paths:
- '.github/workflows/test-integration.yml'
- '.github/workflows/testdata/**'
- 'action.yml'
- 'Dockerfile'
- 'reportsizedeltas/**'
push:
paths:
- '.github/workflows/test-integration.yml'
- '.github/workflows/testdata/**'
- 'action.yml'
- 'Dockerfile'
- 'reportsizedeltas/**'
schedule:
# Run daily at 8 AM UTC to catch breakage caused by changes to external resources.
- cron: "0 8 * * *"
workflow_dispatch:
repository_dispatch:

jobs:
local-source:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run action
# Use arduino/report-size-deltas action from local path
uses: ./
# The action will always fail on PRs submitted from forks due to not having write permissions.
# Some verification can still be achieved by checking the log to see whether it failed in the expected manner:
# WARNING:__main__:Temporarily unable to open URL (HTTP Error 403: Forbidden), retrying
# ...
# TimeoutError: Maximum number of URL load retries exceeded
continue-on-error: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
with:
sketches-reports-source: .github/workflows/testdata/sketches-reports

artifact-source:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run action
# Use arduino/report-size-deltas action from local path
uses: ./
245 changes: 245 additions & 0 deletions .github/workflows/testdata/sketches-reports/arduino-avr-leonardo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
{
"commit_hash": "651f05f4d4aca30ac359e972c01568f873112d43",
"commit_url": "https://github.com/per1234/generate-size-deltas-report/commit/651f05f4d4aca30ac359e972c01568f873112d43",
"boards": [
{
"board": "arduino:avr:leonardo",
"sketches": [
{
"name": "examples/MIDIUSB_clock",
"compilation_success": true,
"sizes": [
{
"name": "flash",
"maximum": 28672,
"current": {
"absolute": 4792,
"relative": 16.71
},
"previous": {
"absolute": 4792,
"relative": 16.71
},
"delta": {
"absolute": 0,
"relative": 0.0
}
},
{
"name": "RAM for global variables",
"maximum": 2560,
"current": {
"absolute": 443,
"relative": 17.3
},
"previous": {
"absolute": 443,
"relative": 17.3
},
"delta": {
"absolute": 0,
"relative": 0.0
}
}
],
"warnings": {
"current": {
"absolute": 2
},
"previous": {
"absolute": 2
},
"delta": {
"absolute": 0
}
}
},
{
"name": "examples/MIDIUSB_loop",
"compilation_success": true,
"sizes": [
{
"name": "flash",
"maximum": 28672,
"current": {
"absolute": 4870,
"relative": 16.99
},
"previous": {
"absolute": 4870,
"relative": 16.99
},
"delta": {
"absolute": 0,
"relative": 0.0
}
},
{
"name": "RAM for global variables",
"maximum": 2560,
"current": {
"absolute": 441,
"relative": 17.23
},
"previous": {
"absolute": 441,
"relative": 17.23
},
"delta": {
"absolute": 0,
"relative": 0.0
}
}
],
"warnings": {
"current": {
"absolute": 3
},
"previous": {
"absolute": 3
},
"delta": {
"absolute": 0
}
}
},
{
"name": "examples/MIDIUSB_read",
"compilation_success": true,
"sizes": [
{
"name": "flash",
"maximum": 28672,
"current": {
"absolute": 4908,
"relative": 17.12
},
"previous": {
"absolute": 4908,
"relative": 17.12
},
"delta": {
"absolute": 0,
"relative": 0.0
}
},
{
"name": "RAM for global variables",
"maximum": 2560,
"current": {
"absolute": 457,
"relative": 17.85
},
"previous": {
"absolute": 457,
"relative": 17.85
},
"delta": {
"absolute": 0,
"relative": 0.0
}
}
],
"warnings": {
"current": {
"absolute": 3
},
"previous": {
"absolute": 3
},
"delta": {
"absolute": 0
}
}
},
{
"name": "examples/MIDIUSB_write",
"compilation_success": true,
"sizes": [
{
"name": "flash",
"maximum": 28672,
"current": {
"absolute": 4524,
"relative": 15.78
},
"previous": {
"absolute": 4564,
"relative": 15.92
},
"delta": {
"absolute": -40,
"relative": -0.14
}
},
{
"name": "RAM for global variables",
"maximum": 2560,
"current": {
"absolute": 197,
"relative": 7.7
},
"previous": {
"absolute": 213,
"relative": 8.32
},
"delta": {
"absolute": -16,
"relative": -0.62
}
}
],
"warnings": {
"current": {
"absolute": 3
},
"previous": {
"absolute": 3
},
"delta": {
"absolute": 0
}
}
}
],
"sizes": [
{
"name": "flash",
"maximum": 28672,
"delta": {
"absolute": {
"minimum": -40,
"maximum": 0
},
"relative": {
"minimum": -0.14,
"maximum": 0.0
}
}
},
{
"name": "RAM for global variables",
"maximum": 2560,
"delta": {
"absolute": {
"minimum": -16,
"maximum": 0
},
"relative": {
"minimum": -0.62,
"maximum": 0.0
}
}
}
],
"warnings": {
"delta": {
"absolute": {
"minimum": 0,
"maximum": 0
}
}
}
}
]
}
Loading

0 comments on commit ef5174b

Please sign in to comment.