Skip to content

Commit 5f66bc6

Browse files
committed
Use GitHub Workflows instead of Circle CI
1 parent b64ba60 commit 5f66bc6

File tree

4 files changed

+66
-89
lines changed

4 files changed

+66
-89
lines changed

.circleci/config.yml

-87
This file was deleted.
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: lint-and-unit-tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- github
8+
- main
9+
- master
10+
schedule:
11+
- cron: 0 1 * * *
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-and-test-python:
16+
runs-on: ubuntu-latest
17+
# NOTE: Lifted from https://github.com/StackStorm/st2/blob/master/.github/workflows/ci.yaml#L183
18+
services:
19+
mongo:
20+
image: mongo:4.4
21+
ports:
22+
- 27017:27017
23+
rabbitmq:
24+
image: rabbitmq:3.8-management
25+
options: >-
26+
--name rabbitmq
27+
ports:
28+
- 5671:5671/tcp # AMQP SSL port
29+
- 5672:5672/tcp # AMQP standard port
30+
- 15672:15672/tcp # Management: HTTP, CLI
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
version:
35+
- "3.6"
36+
- "3.8"
37+
steps:
38+
- uses: actions/checkout@v3
39+
40+
- uses: actions/setup-python@v4
41+
with:
42+
python-version: ${{ matrix.version }}
43+
44+
- name: Clone StackStorm/st2 repo
45+
run: |
46+
make .clone_st2_repo
47+
48+
- name: Reconfigure RabbitMQ
49+
timeout-minutes: 2 # may die if rabbitmq fails to start
50+
run: |
51+
/tmp/st2/scripts/github/configure-rabbitmq.sh
52+
53+
- name: Download and install depedencies
54+
run: |
55+
sudo apt-get update
56+
sudo apt-get -y install libldap2-dev libsasl2-dev
57+
sudo apt-get -y install python3-virtualenv
58+
make requirements
59+
60+
- name: Run lint and tests (Python ${{ matrix.version }})
61+
run: |
62+
make .lint
63+
make .unit-tests

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ROOT_DIR ?= $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
1717
CURRENT_DIR ?= $(shell pwd)
1818
VIRTUALENV_DIR ?= virtualenv
1919
ST2_REPO_PATH ?= /tmp/st2
20-
ST2_REPO_URL ?= git@github.com:StackStorm/st2.git
20+
ST2_REPO_URL ?= https://github.com/StackStorm/st2.git
2121
ST2_REPO_BRANCH ?= master
2222

2323
# nasty hack to get a space into a variable

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# RBAC Backend for StackStorm
2-
[![RBAC Unit Tests Status](https://circleci.com/gh/StackStorm/st2-rbac-backend/tree/master.svg?style=shield)](https://circleci.com/gh/StackStorm/st2-rbac-backend)
2+
3+
[![RBAC Unit Tests Status](https://github.com/StackStorm/st2-rbac-backend/actions/workflows/lint-and-unit-tests.yml/badge.svg)](https://github.com/StackStorm/st2-rbac-backend/actions/workflows/lint-and-unit-tests.yml)
34

45
The RBAC backend started as part of StackStorm core repo and then moved out into a separate
56
repo for enterprise purposes. Some enterprise features such as RBAC has been made open

0 commit comments

Comments
 (0)