Skip to content

Feature/poetry

Feature/poetry #988

Workflow file for this run

name: ansible
on:
schedule:
- cron: 0 0 * * *
pull_request:
paths:
- "ansible/**"
- ".github/workflows/ansible.yaml"
workflow_dispatch:
jobs:
setup_dev_environment:
name: setup_dev_environment
runs-on: ubuntu-22.04
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/checkout@v2-beta
- name: make robotx_ws
run: |
mkdir robotx_ws
- uses: actions/cache@v2
if: ${{ github.event.label.name != 'clean_build' }}
with:
path: robotx_ws/ccache
key: ccache-${{ steps.date.outputs.date }}
- uses: actions/setup-python@v4
with:
python-version: 3.10.6
- uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.15.1
- name: install
run: poetry install --no-interaction
- name: ansible
run: |
poetry run ansible-playbook -i ansible/hosts/localhost.ini ansible/setup_dev_environment.yml --connection local --become -e ansible_user=ubuntu
- name: export repos file
run: vcs export --exact robotx_ws/src > robotx.repos
- uses: actions/upload-artifact@v2
with:
name: robotx.repos
path: robotx.repos
- name: Notify Slack
uses: 8398a7/action-slack@v2
if: failure()
with:
status: ${{ job.status }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
setup_firmware:
name: setup_firmware
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2-beta
- uses: actions/setup-python@v4
with:
python-version: 3.10.6
- uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.15.1
- name: install
run: poetry install --no-interaction
- name: run ansible and install docker
run: |
poetry run ansible-galaxy install -fr ansible/roles/requirements.yml
poetry run ansible-playbook -i ansible/hosts/localhost.ini ansible/setup_mbed_workspace.yml --connection local --become -e ansible_user=ubuntu
- name: Notify Slack
uses: 8398a7/action-slack@v2
if: failure()
with:
status: ${{ job.status }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
setup_dataset:
name: setup_dataset
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2-beta
- uses: actions/setup-python@v4
with:
python-version: 3.10.6
- uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.15.1
- name: install
run: poetry install --no-interaction
- name: run ansible and download dataset
run: |
poetry run ansible-playbook -i ansible/hosts/localhost.ini ansible/setup_dataset.yml --connection local --become -e ansible_user=ubuntu
- name: Notify Slack
uses: 8398a7/action-slack@v2
if: failure()
with:
status: ${{ job.status }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}