This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
Configure Renovate #96
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: Semantic Release Firefox Add-on CICD | |
on: [pull_request, push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['12', '14', '16'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Yarn Cache | |
id: yarn-cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{runner.os}}-yarn- | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --ci | |
- name: Build | |
run: yarn build | |
e2e: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['12', '14', '16'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Yarn Cache | |
id: yarn-cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{runner.os}}-yarn- | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --ci | |
- name: E2E | |
run: | | |
cd e2e | |
yarn test-e2e | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['12', '14', '16'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Yarn Cache | |
id: yarn-cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{runner.os}}-yarn- | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --ci | |
- name: Test | |
run: | | |
yarn test-coverage | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report | |
path: artifacts/coverage | |
coverage: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Yarn Cache | |
id: yarn-cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{runner.os}}-yarn- | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --ci | |
- uses: actions/download-artifact@v2 | |
with: | |
name: coverage-report | |
- name: Test | |
run: | | |
yarn report-coverage | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Yarn Cache | |
id: yarn-cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{runner.os}}-yarn- | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --ci | |
- name: Lint | |
run: yarn lint | |
release: | |
runs-on: ubuntu-latest | |
needs: [lint, test, build, e2e] | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Yarn Cache | |
id: yarn-cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{runner.os}}-yarn- | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --ci | |
- name: Release | |
run: | | |
yarn build | |
yarn release |