Fix for UnboundLocalError: local variable 'loginResult' referenced before assignment #115
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: Test modules | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
pull_request: | |
jobs: | |
test-modules: | |
name: Run tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: ${{github.workspace}}/ansible_collections/adhawkins/borgbase | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ inputs.python }} | |
- name: Install Ansible | |
run: pip install ansible | |
- name: Install module | |
working-directory: ${{github.workspace}}/ansible_collections/adhawkins/borgbase | |
run: ansible-galaxy collection install . | |
- name: Build module | |
working-directory: ${{github.workspace}}/ansible_collections/adhawkins/borgbase | |
run: ansible-galaxy collection build --output-path ${{github.workspace}} | |
- name: Display | |
run: ls -l ${{github.workspace}} | |
- name: Run test | |
working-directory: ${{github.workspace}}/ansible_collections/adhawkins/borgbase | |
run: ansible-test sanity --docker --color yes -v | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::$(grep "^version:" ${{github.workspace}}/ansible_collections/adhawkins/borgbase/galaxy.yml | cut -f2 -d ' ') | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: adhawkins-borgbase-${{ steps.get_version.outputs.VERSION }} | |
path: ${{github.workspace}}/*.tar.gz |