From 6c0e95fc2bdeef0e659bfd3adc6d4547cb96d5c2 Mon Sep 17 00:00:00 2001 From: Teodoro Cook Date: Sun, 24 Sep 2023 08:57:20 -0600 Subject: [PATCH] Refactor github action workflow definitions (#13) --- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++++++++++++ .github/workflows/molecule.yml | 30 ++++----------------------- 2 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..e0447be --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +--- +name: lint + +on: + pull_request: + branches: + - master + +defaults: + run: + working-directory: 'nephelaiio.docker' + +jobs: + + lint: + name: lint + runs-on: ubuntu-latest + steps: + + - name: check out the codebase + uses: actions/checkout@v3 + with: + path: 'nephelaiio.docker' + + - name: set up python 3 + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: install poetry + run: pip3 install poetry + + - name: install pips + run: poetry install + + - name: lint code + run: | + poetry run molecule syntax diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index a9dbc8b..7b303d0 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -3,38 +3,16 @@ name: molecule on: pull_request: + branches: + - master + schedule: + - cron: "0 3 * * 0" defaults: run: working-directory: 'nephelaiio.docker' jobs: - - lint: - name: lint - runs-on: ubuntu-latest - steps: - - - name: check out the codebase - uses: actions/checkout@v3 - with: - path: 'nephelaiio.docker' - - - name: set up python 3 - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - - name: install poetry - run: pip3 install poetry - - - name: install pips - run: poetry install - - - name: lint code - run: | - poetry run molecule syntax - molecule: name: molecule runs-on: ubuntu-latest