Skip to content

Commit

Permalink
Merge branch 'main' into etang/finetuning-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
SumanthRH authored Sep 18, 2024
2 parents c6c3b7b + d21a47f commit d3f420a
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/pre-commit.yaml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/premerge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: premerge

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'

# Install pre-commit dependencies
- name: Install pre-commit
run: pip install pre-commit==3.8.0 jupyter==1.1.1

# Run pre-commit hooks with verbose logging
- name: Run pre-commit
run: pre-commit run --all-files --verbose

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- uses: actions/setup-go@v5
with:
go-version: 1.23

- name: Install pre-commit
run: pip install jupyter==1.1.1

- name: Build
run: bash -ec "(cd ci; go install ./...)"

- name: Check go format
run: bash -ec "(cd ci; go fmt ./... ; git diff --exit-code)"

- name: Test
run: bash -ec "(cd ci; go test -v ./...)"

- name: Build templates
run: bash build.sh
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,7 @@ cython_debug/

# Vim
*.swp

# Build output
_build/
ci/bin
11 changes: 11 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -euo pipefail

echo "--- Building maketmpl"
mkdir -p ci/bin
(cd ci; go build -o bin/maketmpl ./maketmpl/maketmpl)

echo "--- Building template releases"
rm -rf _build
exec ci/bin/maketmpl
3 changes: 3 additions & 0 deletions ci/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/anyscale/templates/ci

go 1.23.1
9 changes: 9 additions & 0 deletions ci/maketmpl/hello.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package maketmpl

import (
"fmt"
)

func Hello() {
fmt.Println("TODO: build templates the new way.")
}
9 changes: 9 additions & 0 deletions ci/maketmpl/maketmpl/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"github.com/anyscale/templates/ci/maketmpl"
)

func main() {
maketmpl.Hello()
}

0 comments on commit d3f420a

Please sign in to comment.