Skip to content

Commit

Permalink
Merge pull request #6 from Renater/add-simple-ci
Browse files Browse the repository at this point in the history
Add basic CI
  • Loading branch information
just1not2 authored Jul 4, 2022
2 parents 0c558e4 + 25a04aa commit db6a615
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/push-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Push Workflow

on: [push]

jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install -r src/providers/openstack/requirements.txt
- name: Analysing the code with Pylint
run: |
pylint .
36 changes: 36 additions & 0 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release Workflow

on: [release]

jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
provider: ["openstack"]
steps:
- name: Set versions to push on DockerHub
run: |
echo "VERSION_FULL=$(echo ${{ github.event.release.tag_name }})" >> $GITHUB_ENV
echo "VERSION_MEDIUM=$(echo ${{ github.event.release.tag_name }} | cut -d '.' -f -2)" >> $GITHUB_ENV
echo "VERSION_SHORT=$(echo ${{ github.event.release.tag_name }} | cut -d '.' -f -1)" >> $GITHUB_ENV
echo "VERSION_LATEST=$(echo latest)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: renater
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
build-args: PROVIDER=${{ matrix.provider }}
tags: >-
renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_FULL }},
renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_MEDIUM }},
renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_SHORT }},
renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_LATEST }}
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ preferred-modules=

# List of regular expressions of class ancestor names to ignore when counting
# public methods (see R0903)
exclude-too-few-public-methods=
exclude-too-few-public-methods=.*

# List of qualified class names to ignore when counting class parents (see
# R0901)
Expand Down

0 comments on commit db6a615

Please sign in to comment.