diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8663f05..a98ee100 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ on: branches: - master +env: + PYTHON_VERSION: '3.9' + jobs: code-quality: runs-on: ubuntu-latest @@ -51,3 +54,43 @@ jobs: steps: - name: Run commitlint uses: opensource-nepal/commitlint@v1 + + smoketest: + runs-on: ubuntu-latest + name: Smoke Test + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Cache Poetry Install + id: cache-poetry + uses: actions/cache@v4 + with: + path: | + /opt/poetry + ~/.cache/pypoetry + .venv + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/pyproject.toml') + }} + + - name: Install Poetry + if: steps.cache-poetry.outputs.cache-hit != 'true' + run: | + export POETRY_HOME=/opt/poetry + python3 -m venv $POETRY_HOME + $POETRY_HOME/bin/pip install poetry==1.8.2 + $POETRY_HOME/bin/poetry --version + + - name: Add Poetry to PATH + run: echo "/opt/poetry/bin" >> $GITHUB_PATH + + - name: Install Package + run: poetry install --no-interaction --no-ansi + + - name: Verify Install + run: poetry run pikaraoke --help