From 8ac08797e3bc426932d471becbc6159720a99c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20B=C3=A4ck?= Date: Wed, 5 Jan 2022 13:03:07 +0100 Subject: [PATCH 1/2] Add tox.ini and GitHub workflow for running examples/validate.py This makes it easy to run the validation script locally as well as for all pushes and pull requests. The tox.ini file can also act as a platform for running other kinds of validations. --- .github/workflows/test.yml | 18 ++++++++++++++++++ tox.ini | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 tox.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..c60f75cf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: Test + +on: + push: + pull_request: + +jobs: + run-tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: pip install tox + + - name: Run tox + run: tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..f6963072 --- /dev/null +++ b/tox.ini @@ -0,0 +1,11 @@ +[tox] +envlist = validate +skip_missing_interpreters = True +skipsdist = True + +[testenv] +basepython = python3 + +[testenv:validate] +deps = -rrequirements.txt +commands = python3 examples/validate.py From 89e3bde1e6af92a0ea29b00019b4c28c88f5f161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20B=C3=A4ck?= Date: Tue, 11 Jan 2022 11:24:17 +0100 Subject: [PATCH 2/2] Add copyright notices --- .github/workflows/test.yml | 15 +++++++++++++++ tox.ini | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c60f75cf..a3e4b961 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,3 +1,18 @@ +# Copyright 2022 Axis Communications AB. +# For a full list of individual contributors, please see the commit history. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + name: Test on: diff --git a/tox.ini b/tox.ini index f6963072..144061d5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,18 @@ +# Copyright 2022 Axis Communications AB. +# For a full list of individual contributors, please see the commit history. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [tox] envlist = validate skip_missing_interpreters = True