Skip to content

Commit

Permalink
chore(ci): add a test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rhamzeh committed Sep 21, 2023
1 parent fa0a1f0 commit 0580a33
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run Tests

on:
merge_group:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
store-name: [github, gdrive, expenses, iot, slack, expenses, custom-roles]

steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0

- name: Get the latest FGA CLI version
run: curl -sL https://api.github.com/repos/vmware/govmomi/releases/latest | jq -r ".tag_name"

- name: Install the FGA CLI
run: |
# Get the latest FGA CLI version
FGA_VERSION=$(curl -sL https://api.github.com/repos/openfga/cli/releases/latest | jq -r ".tag_name")
curl -sLS https://github.com/openfga/cli/releases/download/${FGA_VERSION}/fga_${FGA_VERSION#v}_linux_amd64.deb -o fga-cli.deb
dpkg -i ./fga-cli.dev
- name: Run the tests with the FGA CLI
run: fga model test --tests stores/${{matrix.store-name}}/store.yaml

0 comments on commit 0580a33

Please sign in to comment.