diff --git a/.github/workflows/s390x.yml b/.github/workflows/s390x.yml new file mode 100644 index 000000000..4214682cb --- /dev/null +++ b/.github/workflows/s390x.yml @@ -0,0 +1,41 @@ +name: s390x + +on: + push: + tags: + - '*' + schedule: + # Run every Monday at 6am UTC + - cron: '0 6 * * 1' + +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'))