Skip to content

Commit

Permalink
Merge branch 'main' into 662/mk/use-open-payments-types
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurapov committed Feb 1, 2023
2 parents 9a967f1 + c9ba608 commit e5f3c03
Show file tree
Hide file tree
Showing 37 changed files with 1,629 additions and 2,026 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/docker-backend.yml

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/docker-auth.yml → .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ on:
tags:
- '*'

name: Build / Release Auth Docker Image
name: Build / Release Docker Images

jobs:
build-and-push:
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
matrix:
package: [auth, backend]
platform: [linux/amd64, linux/arm64]
push:
- ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
exclude:
- platform: linux/arm64
push: false
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/rafiki-auth
images: ghcr.io/${{ github.repository_owner }}/rafiki-${{ matrix.package }}
tags: |
type=raw,enable={{is_default_branch}},value=latest
type=raw,enable=true,value={{ sha }}
Expand All @@ -32,13 +40,13 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push auth
uses: docker/build-push-action@v3
- name: Build and push
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
push: ${{ matrix.push }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: packages/auth/Dockerfile
platforms: linux/amd64,linux/arm64
file: packages/${{ matrix.package }}/Dockerfile
platforms: ${{ matrix.platform }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion .github/workflows/lint_test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
backend:
runs-on: ubuntu-latest
needs: checkout
timeout-minutes: 15
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/rafiki/env-setup
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/rafiki/env-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,13 @@ description: "Sets node version, init pnpm, restore cache"
runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
with:
node-version: '16'
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7.9.1
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
version: 7
- uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}

node-version: '18'
cache: 'pnpm'
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ More phone numbers: https://tel.meet/rdx-xoqn-iiq?pin=3263008843276
### Environment Setup

```sh
# install node 16
nvm install lts/gallium
nvm use lts/gallium
# install node 18
nvm install lts/hydrogen
nvm use lts/hydrogen

# install pnpm
corepack enable
Expand Down
26 changes: 13 additions & 13 deletions infrastructure/terraform/rafiki-test/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion infrastructure/terraform/rafiki-test/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.50.0"
version = "~> 4.51.0"
}
}
backend "gcs" {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"repository": "https://github.com/interledger/rafiki",
"engines": {
"node": "16 || 18"
"node": "18"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand All @@ -26,13 +26,13 @@
"devDependencies": {
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@jest/types": "^29.4.0",
"@swc/core": "^1.3.28",
"@jest/types": "^29.4.1",
"@swc/core": "^1.3.31",
"@swc/jest": "^0.2.24",
"@types/jest": "^29.4.0",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"eslint": "^8.32.0",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"eslint": "^8.33.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-react": "^7.32.1",
"husky": "^8.0.3",
Expand Down
5 changes: 3 additions & 2 deletions packages/auth/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM node:16.17.1-slim as builder
FROM node:18.13.0-slim as builder

WORKDIR /workspace

RUN apt update
RUN apt install -y curl xz-utils python3 build-essential

# version in curl is not the version used. Dependent on the last command
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global [email protected]
RUN corepack enable
RUN corepack prepare [email protected] --activate

# pnpm fetch does require only lockfile
COPY pnpm-lock.yaml ./
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@koa/cors": "^4.0.0",
"@koa/router": "^12.0.0",
"ajv": "^8.12.0",
"axios": "^1.2.3",
"axios": "^1.2.6",
"http-signature-utils": "workspace:../http-signature-utils",
"httpbis-digest-headers": "github:interledger/httpbis-digest-headers",
"knex": "^2.4",
Expand All @@ -31,7 +31,7 @@
"objection-db-errors": "^1.1.2",
"open-payments": "workspace:*",
"openapi": "workspace:../openapi",
"pg": "^8.8.0",
"pg": "^8.9.0",
"pino": "^8.8.0",
"pino-pretty": "^9.1.1",
"testcontainers": "^9.1.1",
Expand Down
5 changes: 3 additions & 2 deletions packages/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM node:16.17.1-slim as builder
FROM node:18.13.0-slim as builder

WORKDIR /workspace

RUN apt update
RUN apt install -y curl xz-utils python3 build-essential

# version in curl is not the version used. Dependent on the last command
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global [email protected]
RUN corepack enable
RUN corepack prepare [email protected] --activate

# pnpm fetch does require only lockfile
COPY pnpm-lock.yaml ./
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
clearMocks: true,
testTimeout: 15000,
roots: [`<rootDir>/packages/${packageName}`],
globalSetup: `<rootDir>/packages/${packageName}/jest.setup.js`,
globalSetup: `<rootDir>/packages/${packageName}/jest.setup.ts`,
globalTeardown: `<rootDir>/packages/${packageName}/jest.teardown.js`,
testRegex: `(packages/${packageName}/.*/__tests__/.*|\\.(test|spec))\\.tsx?$`,
moduleDirectories: [
Expand Down
Loading

0 comments on commit e5f3c03

Please sign in to comment.