Skip to content

Commit

Permalink
Update Github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
FranGuam committed Nov 13, 2023
1 parent 0da2fd7 commit c47265a
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pull_request_rules:
- name: branch name check
conditions:
- "head~=^(master|main)/"
- "-merged"
- "-closed"
actions:
close:
message: |
@{{author}}
Wrong Branch Name: {{head}}
Please use a meaningful name instead.
This Pull Request will be closed.
label:
add:
- "invalid"
- name: delete head branch after merge
conditions:
- merged
actions:
delete_head_branch: {}
- name: automatic label Renovate pull requests
conditions:
- author=renovate[bot]
actions:
label:
add:
- "dependencies"
- name: automatic merge for Renovate pull requests
conditions:
- author=renovate[bot]
- check-success=test
actions:
merge:
method: rebase
46 changes: 43 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,51 @@
name: actions

on:
push:
branches: [master]
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Test Run
shell: bash
run: docker compose up -d

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Restore yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{steps.yarn-cache-dir-path.outputs.dir}}
key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}}
restore-keys: |
${{runner.os}}-yarn-
- name: Install dependencies
run: yarn

- name: Test Apply changes
run: |
yarn hasura migrate apply --endpoint http://localhost:23333
yarn hasura metadata apply --endpoint http://localhost:23333
deploy:
if: |
github.event_name == 'push' &&
github.ref_name == 'master' &&
github.repository_owner == 'eesast'
needs: test
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit c47265a

Please sign in to comment.