forked from zotero/translators
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions CI workflow and remove Travis config
- Loading branch information
Showing
7 changed files
with
66 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
/usr/bin/xvfb-run /usr/bin/google-chrome $@ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: Lint, Check, Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
# We're in a shallow single-branch clone, so get the origin/master HEAD and more history | ||
- run: git fetch origin master --depth=1 | ||
- run: git fetch --depth=25 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
|
||
# Local via act | ||
- name: Install packages for act | ||
if: env.ACT == 'true' | ||
run: apt update && apt install -y xvfb git | ||
|
||
- name: Get current connector hash | ||
id: get-connector-hash | ||
run: | | ||
echo "::set-output name=hash::$(git ls-remote https://github.com/zotero/zotero-connectors.git refs/heads/master | awk -F '\\s+' '{print $1}')" | ||
shell: bash | ||
|
||
- name: Cache connector code | ||
id: connector-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: .ci/pull-request-check/connectors | ||
key: connectors-${{ hashFiles('.ci/pull-request-check/check-pull-request.sh') }}-${{ steps.get-connector-hash.outputs.hash }} | ||
|
||
- name: Install node packages | ||
run: npm ci | ||
|
||
#- name: Debugging with tmate | ||
# uses: mxschmitt/[email protected] | ||
|
||
- name: Lint | ||
run: ./lint.sh | ||
working-directory: .ci | ||
|
||
- name: Check deleted.txt | ||
run: ./checkDeletedTxt.sh | ||
working-directory: .ci | ||
|
||
- name: Test pull request | ||
if: github.event_name == 'pull_request' | ||
env: | ||
BROWSER_EXECUTABLE: /home/runner/work/translators/translators/.ci/pull-request-check/xvfb-run-chrome | ||
run: ./check-pull-request.sh | ||
working-directory: .ci/pull-request-check |
This file was deleted.
Oops, something went wrong.