Skip to content

Commit 57f913b

Browse files
authored
Merge pull request StackStorm#69 from mamercad/github
Use GitHub Workflows instead of Circle CI
2 parents b64ba60 + b82b7b5 commit 57f913b

File tree

4 files changed

+65
-89
lines changed

4 files changed

+65
-89
lines changed

.circleci/config.yml

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