Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- release/*
paths:
- VERSION
- server/**
Expand Down Expand Up @@ -181,14 +182,33 @@ jobs:

test:
runs-on: ubuntu-latest
needs: [build-cli, build-server]
needs: [build-cli]
timeout-minutes: 15
concurrency:
group: ci-test-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4

- name: Set up Erlang/Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "27"
elixir-version: "1.18"

- name: Cache Mix dependencies
uses: actions/cache@v4
with:
path: |
server/deps
server/_build
key: mix-${{ runner.os }}-${{ hashFiles('server/mix.lock') }}
restore-keys: mix-${{ runner.os }}-

- name: Compile server
working-directory: server
run: mix deps.get && mix compile

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -203,19 +223,10 @@ jobs:
- name: Make CLI executable
run: chmod +x cli/coflux-linux-amd64

- name: Download server image
uses: actions/download-artifact@v4
with:
name: coflux-image

- name: Load server image
run: gunzip -c coflux-image.tar.gz | docker load

- name: Install test dependencies
run: pip install pytest pytest-xdist
run: pip install pytest pytest-xdist PyJWT cryptography

- name: Run E2E tests
env:
COFLUX_BIN: cli/coflux-linux-amd64
COFLUX_IMAGE: coflux:ci
run: pytest tests/ -n auto
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,17 @@ jobs:
env:
VERSION: ${{ needs.prepare.outputs.version }}
API_VERSION: ${{ needs.prepare.outputs.api_version }}
TARGET_BRANCH: ${{ needs.prepare.outputs.target_branch }}
run: |
gunzip -c coflux-image.tar.gz | docker load
docker tag coflux:ci ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$VERSION
docker tag coflux:ci ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$API_VERSION
docker tag coflux:ci ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$VERSION
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$API_VERSION
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
if [ "$TARGET_BRANCH" = "main" ]; then
docker tag coflux:ci ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
fi

# PyPI
- name: Publish to PyPI
Expand Down
6 changes: 2 additions & 4 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,12 @@ coflux blobs get <key>
Create a `coflux.toml` file (or use `coflux setup`):

```toml
host = "localhost:7777"
# token = "your-token" # or use --token flag
workspace = "default"
modules = ["myapp.workflows", "myapp.tasks"]
concurrency = 8

[server]
host = "localhost:7777"
# token = "your-token" # or use --token flag

[blobs]
threshold = 200 # bytes, values larger stored as blobs

Expand Down
Loading
Loading