forked from mhallin/graphql_ppx
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Travis with Github Actions (mhallin#15)
* fix: probably fix windows build * fix: build * Rename nodejs.yml to test.yml * Update and rename test.yml to main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update CI * fix: esy build * fix: disable windows build * fix: reorder workflow * fix: typo * fix: try to fix * fix: try to figure out env variables * ci: another attempt * another ... * another ... * try release * fix: copy :P * fix: copy :P * ci: another fix * feat: try release * feat: remove travis ci * chore: remove traivis badge * ci: run release job only on release * ci: fix * ci: remove pull_request trigger * ci: pin menhir version for windows build * ci: pin menhir version for windows build * ci: make windows work * ci: fix setting env in windows * ci: windows .... * ci: remove old ci stuff * ci: install cross-env global for windows * fix: improve publish step * fix: try make windows work again pliz * fix: windows doesn't like comments :/ * fix: windows ci * fix: another one for windows :/ * ci: change name
- Loading branch information
Showing
28 changed files
with
384 additions
and
460 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,84 @@ | ||
name: graphql_ppx_re CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test_and_build: | ||
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node-version: [12.x] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: setup | ||
run: | | ||
npm install -g esy@latest cross-env | ||
- name: install | ||
run: | | ||
esy install && cd tests && npm install && cd ../ | ||
- name: build | ||
run: | | ||
esy build | ||
- name: test | ||
run: | | ||
cd tests && npm run test && cd ../ && mv _build/default/src/bucklescript_bin/bin.exe graphql_ppx-${{ matrix.os }}.exe | ||
env: | ||
CI: true | ||
|
||
- name: Upload artifacts ${{ matrix.os }} | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: graphql_ppx-${{ matrix.os }}.exe | ||
path: graphql_ppx-${{ matrix.os }}.exe | ||
|
||
publish: | ||
needs: test_and_build | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Download linux artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: graphql_ppx-ubuntu-latest.exe | ||
path: graphql_ppx-linux-x64.exe | ||
|
||
- name: Download macOS artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: graphql_ppx-macOS-latest.exe | ||
path: graphql_ppx-darwin-x64.exe | ||
|
||
- name: Download windows artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: graphql_ppx-windows-latest.exe | ||
path: graphql_ppx-win-x64.exe | ||
|
||
- name: Move artifacts | ||
run: | | ||
mkdir -p bin | ||
mv graphql_ppx-win-x64.exe bin/graphql_ppx-win-x64.exe | ||
mv graphql_ppx-darwin-x64.exe bin/graphql_ppx-darwin-x64.exe | ||
mv graphql_ppx-linux-x64.exe bin/graphql_ppx-linux-x64.exe | ||
- name: Publish | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
uses: actions/npm@master | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
with: | ||
args: publish |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.