Fix ONT permissions updates to retain unmanaged access controls #524
Workflow file for this run
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
name: "Unit tests" | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} # Experimental builds may fail | |
defaults: | |
run: | |
shell: bash -l -e -o pipefail {0} | |
env: | |
WSI_CONDA_CHANNEL: "https://dnap.cog.sanger.ac.uk/npg/conda/devel/generic" | |
CONDA_TEST_ENVIRONMENT: "testenv" | |
PYTHON_VERSION: "3.10" | |
strategy: | |
matrix: | |
include: | |
# iRODS 4.2.11 clients vs 4.2.7 server | |
- irods: "4.2.11" | |
server_image: "ghcr.io/wtsi-npg/ub-16.04-irods-4.2.7:latest" | |
baton: "4.0.0" | |
experimental: false | |
# iRODS 4.2.11 clients vs 4.2.11 server | |
- irods: "4.2.11" | |
server_image: "ghcr.io/wtsi-npg/ub-18.04-irods-4.2.11:latest" | |
baton: "4.0.0" | |
experimental: false | |
services: | |
mysql: | |
image: "mysql:8.0" | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
env: | |
MYSQL_RANDOM_ROOT_PASSWORD: yes | |
MYSQL_TCP_PORT: 3306 | |
MYSQL_USER: "test" | |
MYSQL_PASSWORD: "test" | |
MYSQL_DATABASE: "mlwarehouse" | |
irods: | |
image: ${{ matrix.server_image }} | |
ports: | |
- 1247:1247 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Initialize Miniconda" | |
run: | | |
echo 'source $CONDA/etc/profile.d/conda.sh' >> "$HOME/.bash_profile" | |
- name: "Cache Miniconda" | |
id: cache-miniconda | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/conda/pkgs | |
~/conda/envs | |
key: ${{ runner.os }}-miniconda | |
- name: "Configure Miniconda" | |
run: | | |
conda config --prepend pkgs_dirs "$HOME/conda/pkgs" | |
conda config --prepend envs_dirs "$HOME/conda/envs" | |
conda config --set auto_update_conda False | |
conda config --prepend channels "$WSI_CONDA_CHANNEL" | |
conda info | |
- name: "Install iRODS clients" | |
run: | | |
conda create -y -n "$CONDA_TEST_ENVIRONMENT" | |
conda install -y -n "$CONDA_TEST_ENVIRONMENT" "irods-icommands=${{ matrix.irods }}" | |
conda install -y -n "$CONDA_TEST_ENVIRONMENT" "baton=${{ matrix.baton }}" | |
- name: "Configure iRODS clients" | |
run: | | |
conda activate "$CONDA_TEST_ENVIRONMENT" | |
mkdir -p "$HOME/.irods" | |
cat <<'EOF' > "$HOME/.irods/irods_environment.json" | |
{ | |
"irods_host": "localhost", | |
"irods_port": 1247, | |
"irods_user_name": "irods", | |
"irods_zone_name": "testZone", | |
"irods_home": "/testZone/home/irods", | |
"irods_default_resource": "replResc", | |
"irods_default_hash_scheme": "MD5" | |
} | |
EOF | |
echo "irods" | script -q -c "iinit" /dev/null | |
ienv | |
ilsresc | |
ils | |
baton-do --version | |
- name: "Setup Python" | |
run: | | |
conda activate "$CONDA_TEST_ENVIRONMENT" | |
conda install -c defaults python="$PYTHON_VERSION" | |
- name: "Setup Python dependencies" | |
run: | | |
conda activate "$CONDA_TEST_ENVIRONMENT" | |
pip install -r requirements.txt | |
pip install -r test-requirements.txt | |
- name: "Check code formatting [Black]" | |
run: | | |
conda activate "$CONDA_TEST_ENVIRONMENT" | |
black --check --diff --quiet . | |
- name: "Run tests" | |
run: | | |
conda activate "$CONDA_TEST_ENVIRONMENT" | |
pip install . | |
pytest --it |