Skip to content

Merge pull request #94 from stackhpc/fix/client-tweaks #279

Merge pull request #94 from stackhpc/fix/client-tweaks

Merge pull request #94 from stackhpc/fix/client-tweaks #279

Workflow file for this run

---
name: Pull request
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: make build
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install mkdocs
run: pip install -r docs/requirements.txt
- run: mkdocs build --strict
rustdocs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build documentation
run: make docs
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Lint
run: make lint
- name: Install ansible-lint
run: pip install ansible-lint==6.17.*
- name: Install Ansible Galaxy requirements
run: ansible-galaxy collection install -r deployment/requirements.yml
- name: Lint Ansible playbook
run: ansible-lint deployment/site.yml
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: make test
compliance-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: make build
- name: Checkout compliance test suite
uses: actions/checkout@v3
with:
repository: stackhpc/s3-active-storage-compliance-suite
path: compliance
- name: Setup python
uses: actions/setup-python@v4
- name: Install compliance test suite dependencies
run: pip install -r requirements.txt
working-directory: compliance
- name: Configure compliance test suite
run: |
echo 'PROXY_URL = "http://localhost:8080"' >> compliance/config.py
working-directory: compliance
- name: Start minio object storage
run: scripts/minio-start
- name: Wait for minio object storage to start
run: |
until curl -if http://localhost:9001; do
sleep 1;
done
- name: Run active storage container
run: make run
- name: Wait for active storage server to start
run: |
until curl -if http://localhost:8080/.well-known/reductionist-schema; do
sleep 1;
done
- name: Create artifacts directory
run: mkdir artifacts
- name: Run compliance test suite
run: pytest -s > artifacts/pytest.log
- name: Get active storage logs
run: docker logs reductionist > artifacts/reductionist.log
if: always()
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: compliance-test
path: artifacts
if: always()
- name: Stop minio object storage
run: scripts/minio-stop
if: always()
- name: Stop active storage container
run: make stop
if: always()
deployment-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
- name: Install deployment dependencies
run: pip install -r deployment/requirements.txt
- name: Install Ansible Galaxy requirements
run: ansible-galaxy collection install -r deployment/requirements.yml
- name: Run Ansible playbook
# GitHub runner already has Docker installed.
run: ansible-playbook -i deployment/inventory deployment/site.yml --skip-tags docker
- name: Install Python client dependencies
run: pip install -r scripts/requirements.txt
- name: Upload some sample data
run: python ./scripts/upload_sample_data.py
- name: Perform a smoke test
run: >
# Get the local IP of the default route
ip=$(ip r get 8.8.8.8 | awk '/via/ { print $7 }') &&
python ./scripts/client.py
sum
--server https://${ip}:8080
--cacert root.crt
--source http://localhost:9000
--username minioadmin --password minioadmin
--bucket sample-data --object data-uint32.dat
--dtype uint32
- name: Debug on failure
run: |
set -x
set +e
docker ps -a
for container in $(docker ps -aq); do
docker logs $container
done
sudo ss -nltp
sudo cat /etc/haproxy/haproxy.cfg
sudo cat /etc/prometheus/prometheus.yml
sudo ip a
sudo ip r
if: failure()
dependency-review:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
# https://github.com/advisories/GHSA-g98v-hv3f-hcfr atty potential unaligned read on Windows
allow-ghsas: GHSA-g98v-hv3f-hcfr