Skip to content

Commit

Permalink
fix: Hasura job rules. (#251)
Browse files Browse the repository at this point in the history
* Create namespace within v18.11.0.

* Create namespace within v18.11.0, again.

* Track namespace creation.

* fix: Add Hasura job rules.

* fix: Hasura job rules.
  • Loading branch information
gary-van-woerkens authored Nov 6, 2020
1 parent 1ec196f commit d487601
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
12 changes: 8 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include:

variables:
AUTO_DEVOPS_RELEASE_AUTO: "YEAH"
AUTO_DEVOPS_TEST_DISABLED: "🛑"
# AUTO_DEVOPS_TEST_DISABLED: "🛑"
# AUTO_DEVOPS_QUALITY_CHECK_DISABLED: "OMG!"

.rule_on_release: &rule_on_release
Expand All @@ -27,14 +27,18 @@ Register Hasura:
extends: .autodevops_register_image
dependencies:
- Build
# needs: []
# needs:
# - job: Build
needs: []
environment:
name: ${CI_COMMIT_REF_NAME}-dev2
variables:
CONTEXT: ./packages/hasura
IMAGE_NAME: $CI_REGISTRY_IMAGE/hasura
rules:
- <<: *rule_on_release
when: on_success
- <<: *rule_on_feature_branch
when: on_success
- when: never

.on_branches_only:
environment:
Expand Down
24 changes: 24 additions & 0 deletions __tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`renders header index content 1`] = `
<DocumentFragment>
<div
class="content"
>
<ul
class="teams"
/>
<div
class="page"
>
<div
class="empty"
>
<p>
Il n'y a aucune publication pour le moment.
</p>
</div>
</div>
</div>
</DocumentFragment>
`;
7 changes: 3 additions & 4 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import React from "react"

import Index from "../src/pages/index"

test("renders header title", () => {
const { getByText } = render(<Index />)
const headerElement = getByText(/Carnets de bord des produits/)
expect(headerElement).toBeInTheDocument()
test("renders header index content", () => {
const { asFragment } = render(<Index />)
expect(asFragment()).toMatchSnapshot()
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"k8s": "yarn --silent --cwd .k8s",
"test": "jest --ci && yarn k8s test",
"test": "jest --ci",
"build": "next build",
"start": "next start",
"test:dev": "jest --watch",
Expand Down

0 comments on commit d487601

Please sign in to comment.