Skip to content

Commit

Permalink
Add integration-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjankoehler committed Dec 12, 2024
1 parent b249b0e commit a43240e
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
##
## --------------------------------------------------------------------------------
## SPDX-FileCopyrightText: 2024 Martin Jan Köhler and Harald Pretl
## Johannes Kepler University, Institute for Integrated Circuits.
##
## This file is part of KPEX
## (see https://github.com/martinjankoehler/klayout-pex).
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
## SPDX-License-Identifier: GPL-3.0-or-later
## --------------------------------------------------------------------------------
##

name: "Integration tests on IIC-OSIC-TOOLS"

on:
workflow_call:
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/integration-tests.yml'

jobs:
tests-inside-docker:
name: "Run tests"
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4

- name: Generate Cache Key from Dockerfiles
id: generate_cache_key
run: |
files="./tests/fixtures/docker-compose.yml"
file_contents=$(cat $files)
key=$(echo "${file_contents}" | sha1sum | awk '{print $1}')
echo "key=${key}" >> "$GITHUB_OUTPUT"
- name: "Cache Docker images"
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-integration-tests-${{ steps.generate_cache_key.outputs.key }}

- name: "Install Docker and run tests"
uses: adambirds/[email protected]
with:
compose-file: "./tests/fixtures/docker-compose.yml"
test-container: iic-osic-tools
test-command: --skip ./run_integration_tests.sh
continue-on-error: true # ensure docker cache is written nevertheless

0 comments on commit a43240e

Please sign in to comment.