Skip to content

Instantly share code, notes, and snippets.

View utamori's full-sized avatar
🏠
Working from home

mori yuta utamori

🏠
Working from home
View GitHub Profile
package middleware
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"net/http"
)
@utamori
utamori / go_pg_run.md
Last active September 24, 2020 06:26
@utamori
utamori / Dockerfile
Created September 23, 2020 05:03
go言語用dockerfile
FROM golang:1.15-buster AS debug
WORKDIR /app
COPY . .
RUN curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
CMD air
FROM golang:1.15-buster AS build
WORKDIR /app
ENV CGO_ENABLED=0
COPY go.* ./
@utamori
utamori / ghactions_cloudrun.md
Last active September 23, 2020 13:09
GitHubActionsでCloudRunにデプロイする方法.md

End-to-Endテスト

End-to-end testing (or “E2E”) is the biggest, scariest, slowest, and most valuable type of testing around. They don’t interact at a code level, they interact like they’re a real user doing real things. They’re usually not going to cover every little thing, they’re more about ensuring critical paths through the ecosystem are supported, touching multiple applications and APIs to achieve that task.

The interactions are real, maybe a few config variables are using “Test” keys for sending emails and making payments, and maybe those are sandbox environments, but everything else is actually happening.

These sorts of tests are slow and hard to set up, they need to have real records created in the database and real users need to exist to do that. If the tests are run in a QA environment maybe they can do a big reset script to make all the APIs start from scratch, or its creating a new user every time - which can make the database huge if these tests run hourly.

E2E usually involves running the enti

githubでemplty commitだけのdraft pullrequestを作るやつを簡単にしたい

いつもの手順

  1. Jiraでタスクを作成する GUI
  2. GitHubでブランチを作成する GUI
  3. ブランチにempty commitする(git commit --allow-empty) GUI or CLI
  4. GitHubでドラフトプルリクエストを作成する。 GUI
  5. ブランチで開発に取り掛かる

Google Kubernetes Engine - GitHub Actions

GitHub Actions を使用して、既存の Google Kubernetes Engine クラスタに静的 Web サイトをデプロイするワークフローの例です。

このコードはあくまでも一例です。設定に合わせて値を変更したり更新したりする必要があるでしょう。

Workflow 詳細

masterブランチのpushに対して、このworkflowは以下を行います。

.. meta:: :description: Migrations setup for an existing Hasura instance :keywords: hasura, docs, migration, setup, existing Hasura

.. _migrations_setup:

Setting up Hasura migrations

.. contents:: Table of contents

はじめに

GinはGo (Golang)で書かれたWebフレームワークです。martiniのようなAPIを採用しており、httprouterのおかげで最大40倍のパフォーマンスを実現しています。パフォーマンスと生産性を求めるならば、Ginを気に入ることでしょう。

Ginの紹介