Skip to content

Commit

Permalink
Merge 9f9c860 into e6b6229
Browse files Browse the repository at this point in the history
  • Loading branch information
ndresx committed Oct 2, 2022
2 parents e6b6229 + 9f9c860 commit b5e9db9
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 64 deletions.
Expand Up @@ -39,11 +39,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
131 changes: 72 additions & 59 deletions .github/workflows/main.yml
Expand Up @@ -2,138 +2,151 @@ name: CI

on:
push:
branches: [ "*" ]
branches: [master]
pull_request:
branches: [ "*" ]
branches: ["*"]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 15.x
uses: actions/setup-node@v1
with:
node-version: "15.x"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install

- name: Build
run: yarn build

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 15.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: "15.x"
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install

- name: "Lint: Prettier"
run: yarn lint:prettier

- name: "Lint: TypeScript"
run: yarn lint:tslint && yarn lint:tsc

test:
needs: build
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 15.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: "15.x"
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install

- name: "Tests: Unit"
run: yarn test

- name: "Tests: E2E"
run: yarn test:e2e

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}


build:
name: Build
needs: [lint, test]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install

- name: Build
run: yarn build

examples:
name: Build examples
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 15.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: "15.x"
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2

- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache-examples
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-examples-${{ hashFiles('examples/**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-examples-
- name: Install master
run: yarn install

- name: Install
run: cd examples && yarn

- name: Build
run: yarn build
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# React <Countdown /> [![npm][npm]][npm-url] [![Build Status](https://travis-ci.com/ndresx/react-countdown.svg?branch=master)](https://travis-ci.com/ndresx/react-countdown) [![Coverage Status](https://coveralls.io/repos/github/ndresx/react-countdown/badge.svg?branch=master)](https://coveralls.io/github/ndresx/react-countdown?branch=master)
# React <Countdown /> [![npm][npm]][npm-url] [![CI: Build Status](https://img.shields.io/github/workflow/status/ndresx/react-countdown/CI)](https://github.com/ndresx/react-countdown/actions/workflows/main.yml) [![Coverage Status](https://coveralls.io/repos/github/ndresx/react-countdown/badge.svg?branch=master)](https://coveralls.io/github/ndresx/react-countdown?branch=master)
A customizable countdown component for React.

* [Getting Started](#getting-started)
Expand Down

0 comments on commit b5e9db9

Please sign in to comment.