Skip to content

Commit 77e0e9b

Browse files
authored
Merge pull request #27 from FusionAuth/jj/test-workflow
fix branch names, clean up test workflow
2 parents 70992f6 + 15ffc99 commit 77e0e9b

3 files changed

Lines changed: 21 additions & 46 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,17 @@
22
#
33
# act pull_request [--input command=[command]] \
44
# --platform fusionauth-builder=[ecr-repo-name]/fusionauth-builder:latest] \
5-
# --workflows ./.github/workflows/release.yaml \
5+
# --workflows ./.github/workflows/deploy.yaml \
66
# --env-file <(aws configure export-credentials --profile [aws-profile] --format env)
77

88
name: Deploy
99

1010
on:
11-
push:
12-
branches:
13-
- main
14-
pull_request:
15-
branches:
16-
- main
1711
workflow_dispatch:
1812
inputs:
1913
command:
2014
type: choice
2115
options:
22-
- build # build only
2316
- publish # build & publish to pypi
2417
- release # build & release to svn
2518
default: build
@@ -28,20 +21,6 @@ permissions:
2821
contents: read
2922

3023
jobs:
31-
build:
32-
if: |
33-
github.event_name == 'pull_request' ||
34-
github.event_name == 'push' ||
35-
github.event_name == 'workflow_dispatch' && inputs.command == 'build'
36-
runs-on: fusionauth-builder
37-
steps:
38-
- name: checkout
39-
uses: actions/checkout@v4
40-
41-
- name: compile
42-
shell: bash -l {0}
43-
run: sb compile
44-
4524
deploy:
4625
if: |
4726
github.event_name == 'workflow_dispatch' &&

.github/workflows/test.yaml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,43 @@
1-
name: run_tests
1+
# Run locally with act:
2+
#
3+
# act pull_request \
4+
# --platform fusionauth-builder=[ecr-repo-name]/fusionauth-builder:latest] \
5+
# --workflows ./.github/workflows/test.yaml
26

7+
name: Test
38

4-
# Controls when the action will run.
59
on:
610
push:
7-
branches: [ "master" ]
11+
branches:
12+
- main
813
pull_request:
9-
branches: [ "master" ]
14+
branches:
15+
- main
1016
workflow_dispatch:
1117

12-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1318
jobs:
14-
# This workflow contains a single job called "run_tests"
1519
run_tests:
16-
# The type of runner that the job will run on
17-
runs-on: ubuntu-latest
20+
runs-on: fusionauth-builder
1821
env:
1922
FUSIONAUTH_URL: http://localhost:9011
2023
FUSIONAUTH_API_KEY: bf69486b-4733-4470-a592-f1bfce7af580
21-
22-
# Steps represent a sequence of tasks that will be executed as part of the job
2324
steps:
24-
# Setup the system with the repository code, Java, and Ruby
2525
- uses: actions/checkout@v4
26-
- uses: isbang/compose-action@v1.5.1
27-
with:
28-
compose-file: './src/test/docker/docker-compose.yml'
29-
down-flags: '--volumes'
30-
- uses: actions/setup-python@v5
31-
with:
32-
python-version: '3.12.2'
26+
27+
- name: Set up FusionAuth
28+
working-directory: src/test/docker
29+
run: docker compose up -d
30+
3331
- name: Install fusionauth library
32+
shell: bash -l {0}
3433
run: pip3 install .
35-
shell: bash
34+
3635
- name: Check to see if FusionAuth is loaded
3736
run: |
3837
bash ./src/test/docker/poll-for-kickstart-finish.sh
39-
shell: bash
40-
# Run the tests
38+
4139
- name: Run tests
40+
shell: bash -l {0}
4241
run: |
4342
python3 src/test/python/fusionauth/rest_client_test.py
4443
python3 src/test/python/fusionauth/fusionauth_client_test.py
45-
shell: bash

src/test/docker/docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
db:
53
image: postgres:16.0-alpine

0 commit comments

Comments
 (0)