phrohdoh / easage

A library that provides programmatic manipulation of BIG archives.
MIT License
9 stars 0 forks source link

Add Appveyor and Travis CI #17

Closed Teteros closed 6 years ago

Teteros commented 6 years ago

Closes #1

Windows tests (appveyor) on master only

How-to updated in this comment

You no longer need to checkout my branch or commit if using the environment variable way to setup deployment keys.

Checkout my branch for editing of the CI files

Deprecated when using env vars.

~git clone --branch ci-ready https://github.com/Teteros/easage easage-ci~ ~cd easage-ci~

Github's Personal Access Token (PAT)

curl -u 'Phrohdoh' -d '{"scopes":["public_repo"],"note":"easage releases"}' https://api.github.com/authorizations

(You will be asked for your github password by CURL)

or if you have two-factor auth enabled you need to make one it directly via settings page (instead of using CURL)

Redacted Curl Output:

{
  ...
  "app": {
    "name": "easage releases",
    ...
  },
  "token": "PAT_TOKEN",
  ...
  "scopes": [
    "public_repo"
  ],
  ...
}

You need the data value of token for setting up CI (i.e PAT_TOKEN)

Appveyor

Deprecated when using env vars.

~Sign up for an open-source account and link it to your github profile if you haven't yet.~

~Enable Appveyor on easage repo from new projects page .~

~Take your PAT token you make earlier via curl/github ~ ~and use Appveyor's encrypt page to get the secure token.~

~sed -i 's/CHANGEME/SECURE_TOKEN/' appveyor.yml~

Travis CI

Deprecated when using env vars

~-Sign up for an open-source account and link it to your github profile if you haven't yet.~

~Install travis-ci command-line client. (ruby+gem install needed)~

~gem install travis -v 1.8.8 --no-rdoc --no-ri~

~Test if travis is now in your path,~

~which travis if not, it might be in ~/.gem/ruby/2.4.0/bin/travis~

~While your shell is still on easage-ci dir you can run:~ ~(Sub in your PAT_TOKEN of course!)~

~sed -i "s|CHANGEME|$(travis encrypt -r Phrohdoh/easage PAT_TOKEN)|" .travis.yml~

Commit changes to ci-ready

Deprecated when using env vars

~If all went well,~

~grep -r "secure:"~

~should reveal the secure: changed for both .travis.yml and appveyor.yml~

~You can now commit changes to the ci-ready branch directly and it should appear on this pull request as as it's linked.~ ~I added [ci skip] to the commit message of command below so the initial commit isn't build:~

~git add {.travis.yml,appveyor.yml}; git commit -m "Changed CI secure tokens [ci skip]"; git push~

Badges

You can edit README.md to include badges for Travis and Appveyor build statuses.

More badges are available from shields.io if you want to get fancy. Maybe one that links to releases?

Travis has a button up top which you can click to display a markdown badge, while for appveyor the link should put you directly to badge preferences page.

Teteros commented 6 years ago

Ignore the mess of https://github.com/Phrohdoh/easage/pull/16, I wiped my tags/releases and it became messy. This is a pull request from a fresh branch.

Teteros commented 6 years ago

As discussed on IRC, here are instructions on using ENV VARs for storage of the deployment keys rather than needing to hard-code them into the CI configs.

This replaces the corresponding sections on the original how-to.

Appveyor

Travis CI

phrohdoh commented 6 years ago

Thank you for your monumental effort in setting up CI for this project. It is much appreciated!

I've merged this now so we can move forward. We can resolve any issues that come up in the future.