Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 18 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

name: CI

jobs:
Expand All @@ -10,14 +13,11 @@ jobs:
env:
LINT: 1
steps:
- uses: technote-space/auto-cancel-redundant-workflow@v1
with:
EXCLUDE_MERGED: 'true'
- name: Set running flag
run: echo "RUNNING=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: technote-space/get-git-comment-action@v1
- uses: technote-space/get-diff-action@v4
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: +(src|__tests__)/**/*.+(js|ts)
FILES: .eslintrc
Expand All @@ -26,17 +26,10 @@ jobs:
run: echo "RUNNING=" >> $GITHUB_ENV
if: "! env.GIT_DIFF"

- name: Get Yarn Cache Directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
if: env.RUNNING
- name: Cache node dependencies
uses: actions/cache@v1
- uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 14
cache: yarn
if: env.RUNNING
- name: Install Package dependencies
run: yarn install
Expand All @@ -55,13 +48,13 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node: ['12', '14']
node: ['14', '16', '18']
steps:
- name: Set running flag
run: echo "RUNNING=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: technote-space/get-git-comment-action@v1
- uses: technote-space/get-diff-action@v4
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: +(src|__tests__)/**/*.+(js|ts|snap)
FILES: |
Expand All @@ -72,10 +65,10 @@ jobs:
run: echo "RUNNING=" >> $GITHUB_ENV
if: "! env.GIT_DIFF"
- name: Set running flag
if: "matrix.node == '12' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
if: "matrix.node == '14' && ! startsWith(github.ref, 'refs/tags/') && github.event.base_ref == format('refs/heads/{0}', github.event.repository.default_branch)"
run: echo "RUNNING=1" >> $GITHUB_ENV
- name: Set running flag
if: matrix.node == '12' && startsWith(github.ref, 'refs/tags/v')
if: matrix.node == '14' && startsWith(github.ref, 'refs/tags/v')
run: echo "RUNNING=1" >> $GITHUB_ENV
- name: Set running flag
run: |
Expand All @@ -84,21 +77,10 @@ jobs:
fi

- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
if: env.RUNNING
- name: Get Yarn Cache Directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
if: env.RUNNING
- name: Cache node dependencies
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: yarn
if: env.RUNNING
- name: Install Package dependencies
run: yarn install
Expand All @@ -114,7 +96,7 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERAGE_FILE: ./coverage/lcov.info
if: env.RUNNING && matrix.node == '12'
if: env.RUNNING && matrix.node == '14'

deploy:
name: Deploy
Expand All @@ -123,10 +105,10 @@ jobs:
timeout-minutes: 10
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: main
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: technote-space/ga-framework
ref: gh-pages
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@technote-space/hello-genetic-algorithm",
"version": "0.2.0",
"version": "0.2.1",
"description": "Hello Genetic Algorithm",
"keywords": [
"genetic algorithm"
Expand Down