Skip to content

Commit c865eb0

Browse files
authored
chore: migrate to github (#1)
* chore: migrate to github * fix: correct typo * fix: remove didiff * fix: correct github scope
1 parent 931ffb2 commit c865eb0

File tree

37 files changed

+129
-1098
lines changed

37 files changed

+129
-1098
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "npm"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI
2+
3+
on: push
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/cache@v2
11+
with:
12+
path: '**/node_modules'
13+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
14+
restore-keys: |
15+
${{ runner.os }}-modules-
16+
- name: Use Node.js
17+
uses: actions/[email protected]
18+
with:
19+
node-version: 14
20+
- run: yarn
21+
- run: yarn run lint
22+
test:
23+
runs-on: ubuntu-20.04
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/cache@v2
27+
with:
28+
path: '**/node_modules'
29+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-modules-
32+
- name: Use Node.js
33+
uses: actions/[email protected]
34+
with:
35+
node-version: 14
36+
- run: yarn
37+
- run: yarn run test:coverage
38+
- uses: codecov/codecov-action@v1
39+
with:
40+
token: ${{ secrets.CODECOV_TOKEN }}
41+
build:
42+
runs-on: ubuntu-20.04
43+
needs: [lint, test]
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Use Node.js
47+
uses: actions/[email protected]
48+
with:
49+
node-version: 14
50+
- run: yarn --pure-lockfile
51+
- run: yarn run build
52+
deploy:
53+
runs-on: ubuntu-20.04
54+
needs: [build]
55+
if: github.ref == 'refs/heads/master'
56+
steps:
57+
- uses: actions/checkout@v2
58+
with:
59+
fetch-depth: "0"
60+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
61+
- name: Git Identity
62+
run: |
63+
git config --global user.name 'Scaleway Bot'
64+
git config --global user.email '[email protected]'
65+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
- name: Use Node.js
69+
uses: actions/[email protected]
70+
with:
71+
node-version: 14
72+
- run: yarn --pure-lockfile
73+
- run: yarn run build
74+
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
75+
env:
76+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
77+
- run: yarn run lerna publish -y --create-release github --ignore-scripts
78+
env:
79+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
80+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
name: Pull Request
3+
on:
4+
pull_request:
5+
types: ['opened', 'edited', 'reopened', 'synchronize']
6+
7+
jobs:
8+
check-title:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/cache@v2
13+
with:
14+
path: '**/node_modules'
15+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
16+
restore-keys: |
17+
${{ runner.os }}-modules-
18+
- name: Use Node.js
19+
uses: actions/[email protected]
20+
with:
21+
node-version: 14
22+
- run: yarn
23+
- run: echo '${{ github.event.pull_request.title }}' | yarn run commitlint

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# scaleway-lib
22

3-
scaleway-lib is a set of NPM packgages used at Scaleway. These libraries are available on our [private NPM registry](https://***REMOVED***).
3+
scaleway-lib is a set of NPM packages used at Scaleway.
44

55
---
66

@@ -28,14 +28,13 @@ scaleway-lib is a set of NPM packgages used at Scaleway. These libraries are ava
2828
- [`@scaleway/eslint-config-react`](./packages/eslint-config-react/README.md): A shared eslint react opiniated configuration
2929
- [`@scaleway/random-name`](./packages/random-name/README.md): A tiny utility to generate random names
3030
- [`@scaleway/regex`](./packages/regex/README.md): usefull regex named
31-
- [`@scaleway/didiff-lib`](./packages/didiff-lib/README.md): diffing-s3-compatible lib for visual testing
3231

3332
## Development
3433

3534
### Locally
3635

3736
```bash
38-
$ git clone git@***REMOVED***/scaleway-lib.git
37+
$ git clone git@github.com:scaleway/scaleway-lib.git
3938
$ cd scaleway-lib
4039
$ yarn
4140
$ # ... do your changes ...

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"conventionalCommits": true
99
},
1010
"version": {
11-
"message": "chore(release): publish [skip-ci]"
11+
"message": "chore(release): publish"
1212
}
1313
}
1414
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@
6363
},
6464
"jest": {
6565
"collectCoverageFrom": [
66-
"packages/*/src/*.{js,jsx}",
67-
"!packages/didiff-lib/capture/screenshot.js"
66+
"packages/*/src/*.{js,jsx}"
6867
],
6968
"coverageReporters": [
7069
"text",

packages/countries/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "1.1.1",
44
"description": "A package containing ISO 3166 and ISO 3166-2 codes",
55
"main": "./countries.json",
6+
"publishConfig": {
7+
"access": "public"
8+
},
69
"repository": {
710
"type": "git",
811
"url": "https://github.com/scaleway/scaleway-lib",

packages/didiff-lib/CHANGELOG.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

packages/didiff-lib/README.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

packages/didiff-lib/logo.png

-6.93 KB
Binary file not shown.

0 commit comments

Comments
 (0)