From fbddb9e2bbb5f8a70603e650923851ee858bc129 Mon Sep 17 00:00:00 2001 From: Ed Slavich Date: Thu, 14 Jan 2021 22:38:41 -0500 Subject: [PATCH 1/2] Add workflow that runs tests on s390x architecture --- .github/workflows/s390x.yml | 42 +++++++++++++++++++++++++++++++++++++ asdf/tests/test_api.py | 6 ++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/s390x.yml diff --git a/.github/workflows/s390x.yml b/.github/workflows/s390x.yml new file mode 100644 index 000000000..30cddb27c --- /dev/null +++ b/.github/workflows/s390x.yml @@ -0,0 +1,42 @@ +name: s390x + +on: + push: + tags: + - '*' + schedule: + # Run every Monday at 6am UTC + - cron: '0 6 * * 1' + pull_request: + +jobs: + pytest: + runs-on: ubuntu-18.04 + name: Python 3.7 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: true + - uses: uraimo/run-on-arch-action@v2.0.5 + name: Run tests + id: build + with: + arch: s390x + distro: buster + shell: /bin/bash + install: | + apt-get update -q -y + apt-get install -q -y git \ + python3 \ + python3-astropy \ + python3-lz4 \ + python3-numpy \ + python3-venv \ + python3-wheel + run: | + python3 -m venv --system-site-packages tests + source tests/bin/activate + pip3 install --upgrade pip setuptools gwcs==0.9.1 pytest==5.4.3 pytest-doctestplus==0.8.0 + pip3 install .[all,tests] + python3 -m pytest --remote-data diff --git a/asdf/tests/test_api.py b/asdf/tests/test_api.py index fa9b44a6a..1c280c671 100644 --- a/asdf/tests/test_api.py +++ b/asdf/tests/test_api.py @@ -2,7 +2,9 @@ import os import io +import getpass import pathlib +import sys import numpy as np from numpy.testing import assert_array_equal @@ -69,6 +71,10 @@ def test_warning_deprecated_open(tmpdir): assert_tree_match(tree, af.tree) +@pytest.mark.skipif( + not sys.platform.startswith('win') and getpass.getuser() == 'root', + reason="Cannot make file read-only if user is root" +) def test_open_readonly(tmpdir): tmpfile = str(tmpdir.join('readonly.asdf')) From cedb4568344dd7024de21665933f6e8c649ec56b Mon Sep 17 00:00:00 2001 From: Ed Slavich Date: Thu, 14 Jan 2021 23:28:52 -0500 Subject: [PATCH 2/2] Remove pull_request trigger --- .github/workflows/s390x.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/s390x.yml b/.github/workflows/s390x.yml index 30cddb27c..4214682cb 100644 --- a/.github/workflows/s390x.yml +++ b/.github/workflows/s390x.yml @@ -7,7 +7,6 @@ on: schedule: # Run every Monday at 6am UTC - cron: '0 6 * * 1' - pull_request: jobs: pytest: