Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate travis tests to Github Actions #139

Merged
merged 2 commits into from
Apr 6, 2021
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"airbnb",
"airbnb-base",
"prettier"
],
"plugins": [
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
pretest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
- run: npm run pretest

posttest:
if: 'false'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
- run: npm run posttest
41 changes: 41 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'Tests: node.js'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
preset: '>=8'
type: 'majors'

latest:
needs: [matrix]
name: 'latest majors'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
before_install: npm install -g pnpm@3 yarn@1
ljharb marked this conversation as resolved.
Show resolved Hide resolved
- run: npm run tests-only

node:
name: 'node 8+'
needs: [latest]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions fixtures/pnpm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"license": "MIT",
"private": true,
"dependencies": {
"eslint": "6.1.0",
"eslint-config-airbnb": "18.0.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"eslint": "^7.2.0",
"eslint-config-airbnb": "18.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^1.7.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@babel/preset-env": "^7.7.4",
"@babel/register": "^7.7.4",
"eslint": "^6.7.2",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
Expand Down
2 changes: 1 addition & 1 deletion src/install-peerdeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "@babel/polyfill";

import fs from "fs";
import { spawn } from "child_process";
import { valid, coerce, maxSatisfying } from "semver";
import { maxSatisfying } from "semver";
import * as C from "./constants";

/**
Expand Down