Merken

Continuous Integration with Lua

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
so far all I guess the that thing of in the things you're among for a time in my name is and Regan as he said and they maintain several reasonably popular offices lewin modules they're all injured help and you can see them on my a website uh so sorry now yes so on my about count which is digital KI KI to TO become find all of them including middle class which is the 1 I recommend for making classes with lower bounds there are many others around them this presentation has several links to several documents are and libraries uh you can find it here the sites I here so you don't have to write every single link down I'm going to put this and the end to so we have to even write this out right now so let's start with the target itself you and I have divided it into 3 parts the 1st 1 here's definitions mostly so it works for any language not just lower than I'm I'm going on into the how about how I do continues integration with fluent and finally there a small conclusion so let's start with the what
and why continents integration I'm going to use the following definition continous and the reason for the purpose of this talk means some automated and frequent checks done on code normally in on a re-poll somewhere so repeated for taking 1 each word individually automated means that they are done by machines by themselves without any human having to say Rhonda tests now frequent it means that
they happen quite often usually people ideally several times per day usually every time anyone makes a committee in the Repo and finally the texts themselves can be quite different people seem to think about checks in continuous integration asked specs which is basically pieces of code that check that your real cold is behaving like you think it should we will see later on that this is not the only thing that you can do on content intuition but it's true that it's the most popular thing to and probably the most important thing to do to that's basically the definition now the y I have to make a confession here 1st before I delve into this which is that it this is my 1st time in Boston and I committed a mistake added and investigates the level of the audience of this talk so I made it quite basic but probably most of you here already know why we should use continues integration so I apologize in advance you will probably already know this stuff now 4 of those of you who don't know what it is or don't know what spec is user just say OK and uh and and that's fine so when people are presented with this thing like you have to look into this integration and write tests angle few machines so later run those tests for you they ask but but it takes a lot of time later that takes a lot of effort I will have to
learn lots of new things to do this thing that you're telling me to do why should I do this under the answer I give them this two fold and add 2 ways of answering this the 1st 1 is a story small story uh based on this graph these represent 2 parallel universes the 1 indirect it's a common project what which started of what development but it which started and people didn't know anything about writing tests for can't use integration or anything just they started writing code and pushed may be putting it on a test server a make model tests and then move into production over time I'm not saying how much time or how much effort because it really depends on the product that over time the coast of adding changes to that source code the in their new features or removing features of fixing bugs increases why what's several reasons 1st of all the people who are working on this project Middle East on the knowledge goes with them new people arise and they start making changes that they don't know break things like this with educators that they forget to check when they make the code things like that uh little by little every new change increases the cost for this happens on every project this is not something I inventing here now on the although universe the same a team of people start by invest in some effort on putting up some consumers and original system and the at the beginning it's true that it takes more time that it takes more effort because they have to configure the server they have to learn how to write these tests that they didn't know how to maybe before but so these cost of learning how to write tests usually can be spread amongst several products so it's not such a big deal but it's true that at the beginning there's a bump in the effort to then however as time goes on the cost of making new changes in the code which is like the silent killer of software in general he's lower why because if someone leaves legacy before I said before their knowledge about these we'd each case that has to be tested is done by the machine ultimately you knew that people is gone already would not new person arrives they commit some change and emotions tells them hey there is higher here you have to take this down so these basically gives you a foundation or a safety net against changes in time all the products I have seen our successful not because the initial months of the voting the but because what hats happened 2 years after the initial comments for the initial efforts so if you have to spend 1 week or 2 weeks configure and added and this stuff I really recommend so as I said the other way to to look at this
it's like a safety structure if your product some mine uh this is for example photo of from South mine in the United States continues integration is this we won't structures on the on the sites with the tunnels but make sure that your product doesn't crumble when there is a change which is this again as quick of of some sort of your products yeah so if you're writing new this so I'm sorry but it's also good to rehire so if you have to convince convince someone else about this now I'm going to going to high do tests were uh tests unconditioned aeration with lower I don't have a lot of times I'm going to explain my particular implementation so I'm using several tools my products are all posted in on get half of the continent's integration main server is Travis and use several all the tools not all of them have nice items so on 1 only showing the 3 you can polis up 1 or several of these by all the tools this is my solution but yours will call be a bit different OK so you have to up it but it's it's simple you'll see the 1st thing you have to do is setting up what are what are called the environment in my case the environment means that I need some way to check things in several versions of low ones I like are the money that once a 5 . 1 but 2 and the 3 you idiot . 0 1 . 1 you might need some special glue of version that you want to check then how do why is run tests on all of these things when using Travis and if you're using Travis unit something called not try stop where no I'm going to college choice when move from now on this is a file that you put on your repo and basically tells Travis how to do those checks I told you about at the beginning go obvious supports several languages from out of the box you have to do very little to set up these environments for these languages for example in Ruby users have to say hey my language is the tropical YML you say my which is really I wanted have my test in all these versions of of Rubik and except care of everything else it is task it's very soon and it classes so that there's it's a bit like magic very easy to set up Lula doesn't have this it's not supported by Travis by default so you have to work a bit more to make it work so what most people end up doing is something like this the use whatever language they want at the beginning it doesn't really matter because you're going to start everything by hand and then you use the and vast namespace that you're seeing their which basically says run 1 set of tests with these environment viable in this case this 1 buyer environment Bible called you up to run them ones with lower uh equals to what of 5 i 5 . 1 and a 1 a lot faster to etc. and then before sometime later in the in the test for the the something like like what you see on the bottom before install run these shell file which is which is styles the version of what I want and version of through our rocks that I want and this it's mostly find I only have a problem with the last line here why because that's in style blew up not sh file looks something like this is on the shelf I which is usually like several hundred lines of code adjustable in your rebuild it's also a shell script which is 1 of my least favorite languages to work on the only 1 I hate more is being script problem and the other 1 to make to have to maintained this stuff only to installed throughout and lower rocks so when I compare it to what I have to do to what what we will be I'm not happy fortunately there is a solution and that solution comes from a we place it comes from Python there is this project called here rocks and again all these links you can find them on the conditions which are line and you will for find a link at the end this project based on in Python I basically allows you to install grew up and where rocks with 1 single commands in whatever folder you want which is great so they're and all the rocks you install later on are inside a folder contained so if you want to test locally in your computer several versions of through you can use this thing to it's very easy so how do you use here rocks with Travis well I am not invented and anything here you can see how to do it on the remainder of rocks but basically you have to do this you set up the and from barrels just like before but then the install it's only 3 lines use of the say that your languages by some only because you want you want to have to pick which is the 1 used to install he rocks which is the real thing that you want and then you have used along with that and that's all the code that you need you need all those hundreds of lines of of Lines of shell script anymore which is the right that's what I wanted so my environment is set up the next thing is specs some people call specs automated tests I like to call them like that because it's a very generic term uh performance tests are also automated tests for example so what I wanna call specs are basically the code that checks that your code behaves like a church like I said before the functionality of your code in the for they for this I use these library bastard it from all the lines labs uh it has uh but the way the way it works is the following you have a library I'm going to treat them very simple library here it just returns a table with a function which maps to 2 numbers and I can test it's like mixed with a busted method basically provides me with several global variables 1 of them is called a describe this summer won't call cause it's and it also changes in the way acid behaves so we can use several things on the global scope that's 1 of the things I like about massive and it's not the only 1 at the end if you want to ask me about what I like about best you can but it's the 1 I use because I think it's at least about 1 out there you can the solid in your computer and run tests for example here I'm running the best of my library class the 1 I recommend forward during classes and if everything goes OK you will see a lot of green dots like this and if 1 of your tests fails you will see something like this 1 in red dots instead of 1 we don't and then 1 um message saying what happened like I was expecting 1 string here I found on all the streams something like that now is installing bus there's been Travis is quite easy it is use the installed namespace here and the you tell what what rocks which is already set up on the environment face result mustard and then you executed with mustard I like to update the verbose option because it gives you more information when there is an error on otherwise it just shuts up so it's great and the another interesting thing is once you have less Travis on its website already shows you a report saying OK you gave me 5 jobs to do 1 with speech environment viable for lower 5 1 0 0 5 2 etc. it shows you hear the result everything is doing it goes
it's also intimated with forget how so in this case I made a pull request and it turns yellow so this means that Travis is running the tests now after a while like 1 minutes maybe it turns it red meaning that something has failed for dream which is everything is fine notice also that the Committee of the top are marked with an red thing here in thing is very they're breaking the building that standing usually used or not and also on the pool request section uh you can see the pull requests that are breaking your or not with the green thing next to them and the question is what it is uh well in in the case of travesties all traumatic at least if you log into Travis with gets hot like aided because in that case you give its permissions to make changes on your repos is who is it who request and yes yes that's the idea has to be automatic if you have to tell it to the if you're not doing it correctly with but it's true that you then have to and enable its on each particle a report that you want so Travis % you with a list of reposts and you say a test this once and then that's all you have to do it's like 2 minutes so as I was telling you before all this gives you like security if someone tangible requests automatically he will see this like hate your pull regressors thread something is not quite OK with what you send me union have to look at it the machines tell him already 2 this is clearly less effort less things you have to maintain the old it also happens in your own products like sometimes I do request pull requests to myself just to make sure that all the tests pass and then I accept them when they're going so so easy that it's worth it's worth it to do it that way I'm going to talk about another kind of text that you can do now coverage coverage is a number is not really a the set of tests when you run the specs on your code coverage these the amount of lines of your library that have been run by those specs for those tests so In this case I use coveralls and he gives me what what investors presenting car it in a very human friendly way uh the view I like the most is this 1 this is make my main file middle class and there are 3 colors but these are the lines of code over that file a 3 colors the white ones will wide ones are not important clients like and at the end of a function or else on and if they have syntactic value but not semantic the the rest are interesting the green ones number next to them these that is telling me how many times each line has been executed why running the specs the red 1 over there is 1 which he's not run at all while while my tests run so basically this means I'm missing the somewhere I should add that best that make sure the if else if at least executed once this is still happening on my code I plan to fix it after follows them but if you understand the of request you can and on the tests will run out what again everything and you will see all this if you want uh coveralls also into which will get so instead of 3 there instead of 2 texts uh the 1st 2 here our from time is on the last 1 is from coveralls it's saying a everything is OK the coverage hasn't gone down after this pull request um an important thing to mention is that coveralls itself is a presentation tool in that and we calculate the coverage of the covariance coverage sorry you have to pass it some kind of Jason and then in that it's thing it's % um so how do you do that you use something called the like of which is the standard coverage tool from new but coveralls that's an understanding all all put format of this thing so we have to pass it through on of a project called you out coveralls which mitigate translates and sends it to the server of coveralls so certain these up is actually quite easy again you can install both of these things with throughout rocks so you put it on the start section of Thomas and then you add the and is everything has gone all right because if you have a failure probably your cover it doesn't really matter if everything was OK then you send the coverage of results to try to copy coveralls but I 0 1 interesting thing about this 1 case of synergy with the tools they use is that bastard which is a all for the year specs already supports look off if you add the coverage option when you run it it already did the file with the things that uh the all the tool needs so this is great and also I want to know this but at the end I had to have these special parameter because I'm using uh here rocks the style the stuff on it's a bit non-standard so you have to tell it hey don't look at the here rocks part of the coverage the last thing I want to talk about this static analysis and for this the best all I know for lower is logic by Peter Miller tangled up hope I say about all right these basically is a tool that you can run independently of the all the others but I I wanted to talk about it at the end it doesn't need to run your code it just it just needs to read it and then gets lots of useful warnings and arrows from this is how you run it locally i'd tells you for example you're not using these viable that you that you had before or things like that but the 1 that will broaden there to the most the that the detects global viable declarations saved by mistake you forget about the local somewhere it will tell you and me and I remove the warning so this is very good the to make it out to make it it is so good to make it all them I think that it's possible to hook up take with your editor so every time you save a file it says you're ready hey you the tangled global rivals here so potential the under the although things that you can take from the low that's more it the most interesting 1 sitting up in Travis is quite easy to do with lower rocks and then I said it I wanted to say at the end it's also integrated with bastard because has told you before master declares some global variables I described or beats I new what take has blessed section the option that MIT basically makes it ignore those global variables otherwise it will it will tell you something like a I don't know what these describe thing that you have to me about this and it will give you an error so everything is integrated on that's why I like it all together now this is how you set up the environment so his you us and what rocks several versions of them and this is basically running specs running coverage and running uh static analysis of your code overall use like 20 lines of code you do a lot of stuff so it's totally worth it and I'm running out of time so I'm going to skip over this section but you can ask me in the questions exons if you want these these these are things of items to be my by half investigated there C extensions
to the if you have questions all that as made after the presentations of escape working with my guess of windows if you have questions or that ask me later and I will tell you
but the conclusion now we have seen what it is why she should we use it and how to do it with a lower 1 thing that I should stress is that I never put here if we should do it because we should do it alice who where something like a height of 1 we can call that we're doing and then throwing away or 1 a game jam of 1 week or something like that in that case you can stick them because its initial bond is going to make it not worth it but in any other case any serious project that takes more than 1 month to their develop you should do this always that's why it failed and that's why have they do
thank so the of questions for you want to copy the link here and do it now like anyone wants to ask about how do they do with on Windows I only use it for playing games but some people use it for other stuff I see that you don't use Windows yes this is for some courses just here and there well let me go quickly through the C extensions but because poly that will interest you anyway so going back here this is quite this is what you will get on Google images if you look for C extensions this is quite weird uh at CERN musical instrument called counter I think and it has a lot of several strings for 1 of them is called a C-string because of the note that it places In some cases they want to make it longer so it plays more notes so they add as C extension to the to the instruments which is quite nice but in no I means that you are doing some library that interacts with maybe a better ways of something like 11 units see in that case rocks make is your friend you appalling need to do a rock that that that something like this in Europe the we bore you will have our rock spec called usually S C M something that your name SCM Proc spec and it will have a build command say in a you you should run can you should and do this and do that on a bunch of stuff that I'm not really interested on because my libraries have pure roll anomalies so final interesting thing that you should know is that in that we sell all those compilers the make and stuff that you have to be start to make se work Travis a support some of that stuff you said the language to see and then the recent Adams APT packages section that allows you to install of trying them on C make and everything faster that if you st stole the to do APT getting stars whatever bycatch unit so use these instead of manually running a pitching style every time because it's faster and at the end you should run at some point lot rocks make to run the other thing with the SCN sup spec and everything and that's it ah yes final important thing is that there are examples of Thomas way model in this 1 of 1 that I found this on the porch project uh that their Thomas why melt or a that's the stuff like the start in compilers and untreated in the the easy extension and everything so you can look at it and see how they do it because I don't know it myself that this is window not for the the the thank you
Web Site
Klasse <Mathematik>
Formale Sprache
Einfache Genauigkeit
Kombinatorische Gruppentheorie
Binder <Informatik>
Zählen
Modul
Computeranimation
Gebundener Zustand
Office-Paket
Stetige Abbildung
Digitalisierer
Mereologie
Programmbibliothek
Hilfesystem
Softwaretest
Winkel
Kontinuierliche Integration
Schreiben <Datenverarbeitung>
Code
Integral
Übergang
Arithmetisches Mittel
Virtuelle Maschine
Code
Ablöseblase
Wort <Informatik>
Inhalt <Mathematik>
Repository <Informatik>
Resultante
Bit
Nabel <Mathematik>
Atomarität <Informatik>
Formale Sprache
Versionsverwaltung
Computer
Systemzusammenbruch
Eins
Streaming <Kommunikationstechnik>
Stetige Abbildung
Einheit <Mathematik>
Prozess <Informatik>
Mixed Reality
Kontrollstruktur
Skript <Programm>
Tonnelierter Raum
Default
Auswahlaxiom
Gerade
Softwaretest
Lineares Funktional
Namensraum
Physikalischer Effekt
Systemaufruf
Ausnahmebehandlung
Programmierumgebung
Quellcode
Biprodukt
Konfiguration <Informatik>
Divergente Reihe
Menge
Konditionszahl
Windkanal
Server
Ablöseblase
Projektive Ebene
Information
Programmierumgebung
Repository <Informatik>
Message-Passing
Fehlermeldung
Tabelle <Informatik>
Zeichenkette
Web Site
Gewicht <Mathematik>
Quader
Klasse <Mathematik>
Mathematisierung
Zahlenbereich
Implementierung
Sprachsynthese
Code
Data Mining
Task
Virtuelle Maschine
Variable
Informationsmodellierung
Digitale Photographie
Software
Programmbibliothek
Installation <Informatik>
Datenstruktur
Softwareentwickler
Grundraum
Konfigurationsraum
Gammafunktion
Graph
Green-Funktion
Physikalisches System
Elektronische Publikation
Binder <Informatik>
Quick-Sort
Programmfehler
Integral
Mapping <Computergraphik>
Generizität
Skalarprodukt
Bus <Informatik>
Verkehrsinformation
Mittelwert
Resultante
Kovarianzfunktion
Versionsverwaltung
Kontinuierliche Integration
Analysis
Eins
Stetige Abbildung
Schwebung
Hook <Programmierung>
Maskierung <Informatik>
Bildschirmfenster
Translation <Mathematik>
Chi-Quadrat-Verteilung
Gerade
Softwaretest
Managementinformationssystem
Lineares Funktional
Parametersystem
Sichtenkonzept
Computersicherheit
Gebäude <Mathematik>
Biprodukt
Variable
Konfiguration <Informatik>
Arithmetisches Mittel
Texteditor
Menge
Deklarative Programmiersprache
Ablöseblase
Server
Dateiformat
Garbentheorie
Projektive Ebene
Repository <Informatik>
Programmierumgebung
Fehlermeldung
Standardabweichung
Klasse <Mathematik>
Mathematisierung
Zahlenbereich
Kombinatorische Gruppentheorie
Mathematische Logik
Code
Überlagerung <Mathematik>
Virtuelle Maschine
Variable
Hardware-in-the-loop
Modul <Datentyp>
Endogene Variable
Programmbibliothek
Zeitrichtung
Thread
Maßerweiterung
Analysis
Green-Funktion
Mailing-Liste
Elektronische Publikation
Touchscreen
Mereologie
Kantenfärbung
Partikelsystem
Verkehrsinformation
Obere Schranke
Punkt
Compiler
Formale Sprache
Hausdorff-Raum
Binder <Informatik>
Polygon
Kontinuierliche Integration
Programmfehler
Stetige Abbildung
Informationsmodellierung
Einheit <Mathematik>
Spieltheorie
Gruppe <Mathematik>
Bildschirmfenster
Ablöseblase
Programmbibliothek
Projektive Ebene
Garbentheorie
Gleitendes Mittel
Maßerweiterung
Normalspannung
Bildgebendes Verfahren
Zeichenkette
Speicherabzug
Computeranimation

Metadaten

Formale Metadaten

Titel Continuous Integration with Lua
Serientitel FOSDEM 2016
Teil 91
Anzahl der Teile 110
Autor Garcia Cota, Enrique
Lizenz CC-Namensnennung 2.0 Belgien:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
DOI 10.5446/31005
Herausgeber FOSDEM VZW
Erscheinungsjahr 2016
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik

Ähnliche Filme

Loading...