-
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.
- Loading branch information
1 parent
ced1b22
commit a6ce83c
Showing
1 changed file
with
56 additions
and
22 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 |
---|---|---|
|
@@ -22,42 +22,76 @@ | |
## -------------------------------------------------------------------------------- | ||
## | ||
|
||
name: "Integration tests on IIC-OSIC-TOOLS" | ||
name: "Integration tests" | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- '.github/workflows/integration-tests.yml' | ||
env: | ||
KLAYOUT_DEB: "klayout_0.29.10-1_amd64.deb" | ||
KLAYOUT_URL: "https://www.klayout.org/downloads/Ubuntu-24/$KLAYOUT_DEB" | ||
|
||
|
||
jobs: | ||
tests-inside-docker: | ||
name: "Run tests" | ||
runs-on: ubuntu-latest | ||
run-tests: | ||
name: "Run integration tests" | ||
runs-on: ubuntu-24 | ||
continue-on-error: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Generate Cache Key from Dockerfiles | ||
id: generate_cache_key | ||
- name: "Cache klayout deb 📦 download" | ||
id: cache-klayout-deb | ||
uses: actions/cache@v4 | ||
with: | ||
path: klayout-deb | ||
key: ${{ runner.os }}-klayout-deb | ||
|
||
- name: "Download klayout deb 📦" | ||
if: steps.cache-klayout-deb.outputs.cache-hit != 'true' | ||
run: | | ||
files="./tests/fixtures/docker-compose.yml" | ||
file_contents=$(cat $files) | ||
key=$(echo "${file_contents}" | sha1sum | awk '{print $1}') | ||
echo "key=${key}" >> "$GITHUB_OUTPUT" | ||
mkdir -p klayout-deb | ||
pushd klayout-deb | ||
wget "$KLAYOUT_URL" | ||
find . | ||
popd | ||
- 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 | ||
- name: "Install klayout deb 📦" | ||
run: | | ||
apt install klayout-deb/$KLAYOUT_DEB | ||
klayout -v | ||
# run-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 | ||
|