Skip to content

Commit

Permalink
Merge pull request #29 from pmowrer/github-actions
Browse files Browse the repository at this point in the history
chore(ci): migrate from travis to github-actions
  • Loading branch information
pmowrer committed Jan 16, 2024
2 parents ec440ec + 73fe14f commit 301e957
Show file tree
Hide file tree
Showing 9 changed files with 2,203 additions and 2,967 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Release preview
on: [pull_request]
jobs:
release-preview:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
# semantic-release dry-run workaround https://github.com/semantic-release/semantic-release/issues/1890#issuecomment-974512960
- run: git checkout -b ${{ github.head_ref }}
- run: unset GITHUB_ACTIONS && yarn && yarn run semantic-release-github-pr --debug
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: yarn && yarn run semantic-release --debug
11 changes: 11 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Tests
on: [pull_request]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: yarn && yarn test
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Updater Inc.
Copyright (c) 2023 Patrick Mowrer.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# semantic-release-plugin-decorators

[![Build Status](https://travis-ci.org/pmowrer/semantic-release-plugin-decorators.svg?branch=master)](https://travis-ci.org/pmowrer/semantic-release-plugin-decorators) [![npm](https://img.shields.io/npm/v/semantic-release-plugin-decorators.svg)](https://www.npmjs.com/package/semantic-release-plugin-decorators) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
![Tests workflow](https://github.com/pmowrer/semantic-release-plugin-decorators/actions/workflows/tests.yml/badge.svg) [![npm](https://img.shields.io/npm/v/semantic-release-plugin-decorators.svg)](https://www.npmjs.com/package/semantic-release-plugin-decorators) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)


This library provides utility functions to inject/extend plugins passed to `semantic-release`, allowing augmentation of any arbitrary plugin configuration in a way that the plugin system itself doesn't allow.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "semantic-release-plugin-decorators",
"version": "0.0.0-development",
"main": "src/index.js",
"repository": "git@github.com:Updater/semantic-release-plugin-decorators.git",
"repository": "git@github.com:pmowrer/semantic-release-plugin-decorators.git",
"scripts": {
"format": "prettier --write --single-quote --trailing-comma es5",
"format:all": "yarn format \"./**/*.js\"",
Expand Down
10 changes: 8 additions & 2 deletions src/wrapStep.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ describe('#wrapStep', () => {
options: {
plugins: [],
},
logger: {
log: jest.fn(),
},
};

describe('and any of the step functions in the array are ran', () => {
Expand Down Expand Up @@ -81,6 +84,9 @@ describe('#wrapStep', () => {
],
],
},
logger: {
log: jest.fn(),
},
};

describe('and the step functions up to index n are run', () => {
Expand All @@ -89,8 +95,8 @@ describe('#wrapStep', () => {

beforeEach(() => {
wrapStepFn.mockReturnValue(wrappedFn);
wrappedFn.mockReturnValueOnce(1);
wrappedFn.mockReturnValueOnce(2);
wrappedFn.mockReturnValueOnce(Promise.resolve(1));
wrappedFn.mockReturnValueOnce(Promise.resolve(2));

results = verifyConditions
.slice(0, context.options.plugins.length)
Expand Down
Loading

0 comments on commit 301e957

Please sign in to comment.