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

Switch to GitHub Actions #531

Merged
merged 13 commits into from
Aug 1, 2020
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Generate Docs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dherman @amilajack Do we use Github Pages for docs anymore? I thought we switched to only using docs.rs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea we do. I think the domain is hosted with netlify. But our static content for the site is hosted with gh pages. Cargo generated API docs are hosted on docs.rs.


on:
push:
branches:
- master

jobs:
doc:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Rust ${{ matrix.rust-toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Run cargo doc
run: cargo doc
- name: edit target/doc/index.html
run: 'echo "<meta http-equiv=refresh content=0;url=neon/index.html>" > target/doc/index.html'
- name: Push docs to gh-pages branch
uses: JamesIves/github-pages-deploy-action@37acdb9c8dbc56e55255f36199ba2f3651b74db3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious how this works. Does GitHub automatically give you this, or did we already have a secret called GITHUB_TOKEN installed somewhere in the repo settings? I couldn't find anything in the repo's settings tab.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub automatically gives it to you. It has limited permissions and a short TTL. It's one of the best features of actions. ❤️

BRANCH: gh-pages
FOLDER: target/doc
32 changes: 32 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test on Linux

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
rust-toolchain: [stable, beta, nightly]

steps:
- uses: actions/checkout@v2
- name: Use Rust ${{ matrix.rust-toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install g++-4.8
run: sudo apt-get install -y g++-4.8
- name: set DISPLAY env
run: echo "::set-env DISPLAY=:99.0"
- name: run cargo test
uses: GabrielBB/xvfb-action@e9adbdcd44108e54f12d6a49a373a074385b8512
with:
run: cargo test --release -- --nocapture
30 changes: 30 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test on MacOS

on: [push, pull_request]

jobs:
build:

runs-on: macos-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
rust-toolchain: [stable, beta, nightly]

steps:
- uses: actions/checkout@v2
- name: Use Rust ${{ matrix.rust-toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
target: x86_64-apple-darwin
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# - name: update node-gyp to latest
# # https://github.com/nodejs/node-gyp/issues/1933#issuecomment-586915535
# run: npm install -g node-gyp@latest
- name: run cargo test
run: cargo test --release
31 changes: 31 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test on Windows

on: [push, pull_request]

jobs:
build:

runs-on: windows-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
rust-toolchain: [stable, beta, nightly]

steps:
- uses: actions/checkout@v2
- name: Use Rust ${{ matrix.rust-toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
target: x86_64-pc-windows-msvc
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# - name: update node-gyp to latest
# # https://github.com/nodejs/node-gyp/issues/1933#issuecomment-586915535
# run: npm install -g node-gyp@latest
- run: npm config set msvs_version 2019
- name: run cargo test
run: cargo test --release
55 changes: 0 additions & 55 deletions .travis.yml

This file was deleted.

53 changes: 0 additions & 53 deletions appveyor.yml

This file was deleted.

12 changes: 6 additions & 6 deletions test/electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"repository": "https://github.com/electron/electron-quick-start",
"devDependencies": {
"electron": "^6.0.7",
"electron": "^6.0.9",
"electron-build-env": "^0.2.0",
"spectron": "^8.0.0"
}
Expand Down