-
Notifications
You must be signed in to change notification settings - Fork 5
test role via molecule #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
230039a
test role via molecule
ltalirz bd7574a
undo change of default value
ltalirz 776798f
incorporate suggestions from code review
ltalirz 1453795
add server url
ltalirz da38735
switch to compute canada server
ltalirz 89b772f
Merge branch 'master' into add-ci-clean
ltalirz bc2ca5b
remove SERVER URL again
ltalirz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
galaxy-name: "cvmfs_contrib.cvmfs_client" | ||
|
||
jobs: | ||
|
||
molecule: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
distro: [centos8] | ||
fail-fast: false | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
path: ${{ env.galaxy-name }} | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install --upgrade pip wheel | ||
pip --version | ||
|
||
- name: Install requirements | ||
run: | | ||
pip install --use-feature=2020-resolver -r requirements.txt | ||
working-directory: ${{ env.galaxy-name }} | ||
|
||
# See https://github.com/geerlingguy/raspberry-pi-dramble/issues/166 | ||
- name: Force GitHub Actions' docker daemon to use vfs. | ||
run: | | ||
sudo systemctl stop docker | ||
echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' | sudo tee /etc/docker/daemon.json | ||
sudo systemctl start docker | ||
|
||
- name: Run molecule | ||
run: molecule test | ||
working-directory: ${{ env.galaxy-name }} | ||
env: | ||
MOLECULE_DISTRO: ${{ matrix.distro }} | ||
|
||
# release: | ||
# name: Publish to ansible-galaxy | ||
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
# needs: [pre-commit, molecule] | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: robertdebock/galaxy-action@1.0.3 | ||
# with: | ||
# galaxy_api_key: ${{ secrets.GALAXY_API_KEY }} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
|
||
- name: Converge | ||
hosts: all | ||
become: true | ||
|
||
pre_tasks: | ||
- name: Update apt cache. | ||
apt: update_cache=yes cache_valid_time=600 | ||
when: ansible_os_family == 'Debian' | ||
|
||
roles: | ||
- role: cvmfs_contrib.cvmfs_client | ||
rptaylor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
vars: | ||
cvmfs_client_configure_storage: false | ||
cvmfs_cache_size: "1000" # small cache size for CI | ||
cvmfs_http_proxy: "DIRECT" |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
|
||
dependency: | ||
name: galaxy | ||
options: | ||
role-file: ansible-role-requirements.yml | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1804}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
converge: converge.yml |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
- name: Verify | ||
hosts: all | ||
become: true | ||
|
||
tasks: | ||
- name: Test loading the Compute Canada module environment | ||
shell: source /cvmfs/soft.computecanada.ca/config/profile/bash.sh |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# for running tests | ||
molecule[docker]~=3.3.0 | ||
docker~=4.4.4 | ||
ansible~=4.8.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.