Skip to content

Commit

Permalink
Add ci cd
Browse files Browse the repository at this point in the history
  • Loading branch information
twsl committed Sep 29, 2024
1 parent fa5c899 commit 0158736
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/assets/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_src_path: ./project
author_email: 45483159+twsl@users.noreply.github.com
author_username: twsl
copyright_holder: twsl
copyright_holder_email: 45483159+twsl@users.noreply.github.com
copyright_license: MIT
copyright_year: 2024
custom_install: true
github_runner:
- ubuntu-latest
github_runner_python_version:
- '3.11'
- '3.12'
include_copilot: false
include_databricks: false
include_docs: true
include_notebooks: true
include_sample_code: false
line_ending: lf
primary_branch: main
project_description: ''
project_name: example-project
python_package_command_line_name: example-project
python_package_distribution_name: example-project
python_package_import_name: example_project
python_version: '3.11'
repository_name: example-project
repository_namespace: twsl
repository_provider: github.com
self_signed: false
use_precommit: true
48 changes: 48 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on:
push:
pull_request:
workflow_dispatch:

jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Add poetry to path
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH

- name: Set up cache
uses: actions/cache@v4
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction

- name: Test
run: poetry run copier copy -a ./.github/assets/.copier-answers.yml --force ./project ./dist

0 comments on commit 0158736

Please sign in to comment.