This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
chore(deps): update dependency babel-plugin-module-resolver to v5 #7218
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
- push | |
- pull_request | |
env: | |
HUSKY: 0 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: Get yarn cache directory path | |
id: init | |
shell: bash | |
run: | | |
echo "::set-output name=yarn_cache::$(yarn cache dir)" | |
# | |
echo "Node $(node --version)" | |
echo "NPM $(npm --version)" | |
echo "Npx $(npx --version)" | |
echo "Yarn $(yarn --version)" | |
# | |
# HACK(douglasduteil): symlink node to /usr/bin/node | |
# Avoid the npx jest error on e2e tests | |
# /usr/bin/env: 'node': No such file or directory | |
# see https://github.com/nodejs/node-v0.x-archive/issues/3911 | |
sudo ln -s $(which node) /usr/bin/node | |
- name: Installing | |
run: yarn --frozen-lockfile --perfer-offline --link-duplicates | |
- name: Upgrade yarn.lock files in templates according to @socialgouv/kosko-charts root project | |
shell: bash | |
run: | | |
cd templates | |
TEMPLATES_DIR=$(pwd) | |
for TEMPLATE_DIR in */; do | |
cd $TEMPLATES_DIR/$TEMPLATE_DIR | |
node -e " | |
const package = JSON.parse(fs.readFileSync('package.json')); | |
const tmpPackage = { | |
...package, | |
resolutions: { | |
...(package.resolutions || {}), | |
'@socialgouv/kosko-charts': 'link:../..' | |
} | |
}; | |
fs.writeFileSync('package.json', JSON.stringify(tmpPackage, null, 2));" | |
yarn --perfer-offline | |
node -e " | |
const tmpPackage = JSON.parse(fs.readFileSync('package.json')); | |
const package = { | |
...tmpPackage, | |
resolutions: Object.entries(tmpPackage.resolutions).reduce((acc, [key, value]) => { | |
if(key !== '@socialgouv/kosko-charts'){ | |
acc[key] = value; | |
} | |
return acc; | |
},{}) | |
}; | |
if(Object.keys(package.resolutions).length===0){ | |
delete package.resolutions; | |
} | |
fs.writeFileSync('package.json', JSON.stringify(package, null, 2));" | |
echo "templates/${TEMPLATE_DIR}yarn.lock" updated | |
done | |
- name: Lint | |
run: yarn lint | |
- name: Unit tests | |
run: yarn test --coverage --coverageReporters=lcov --coverageReporters=text-summary | |
- name: Build | |
run: yarn build | |
- name: Functional tests | |
run: yarn e2e | |
- name: Build to lib folder for archives | |
run: yarn build --outDir lib | |
- name: Archive lib components | |
uses: actions/upload-artifact@v2 | |
with: | |
name: components | |
path: lib/ | |
release: | |
needs: | |
- build | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: lts/* | |
- name: Download lib form build job | |
uses: actions/download-artifact@v2 | |
with: | |
name: components | |
path: . | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v2 | |
with: | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/exec | |
@semantic-release/git | |
env: | |
GIT_AUTHOR_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} | |
GIT_AUTHOR_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.SOCIALGROOVYBOT_NPM_TOKEN }} |